From 535d8a43e440fa4306875651f98dd926d404e4de Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 21 Jun 2020 17:37:07 +0200 Subject: [PATCH] :pencil: Add example for setVolume method --- src/Player.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Player.js b/src/Player.js index 4dfe88d..1f73ca0 100644 --- a/src/Player.js +++ b/src/Player.js @@ -251,6 +251,19 @@ class Player { * @param {Discord.Snowflake} guildID The ID of the guild where the music should be modified * @param {number} percent The new volume (0-100) * @returns {Promise} + * + * @example + * client.on('message', (message) => { + * + * const args = message.content.slice(settings.prefix.length).trim().split(/ +/g); + * const command = args.shift().toLowerCase(); + * + * if(command === 'setvolume'){ + * client.player.setVolume(message.guild.id, parseInt(args[0])); + * message.channel.send(`Volume set to ${args[0]} !`); + * } + * + * }); */ setVolume (guildID, percent) { return new Promise((resolve, reject) => {