📝 Add example for setVolume method

This commit is contained in:
Androz2091 2020-06-21 17:37:07 +02:00
parent b8dee7bce2
commit 535d8a43e4

View file

@ -251,6 +251,19 @@ class Player {
* @param {Discord.Snowflake} guildID The ID of the guild where the music should be modified * @param {Discord.Snowflake} guildID The ID of the guild where the music should be modified
* @param {number} percent The new volume (0-100) * @param {number} percent The new volume (0-100)
* @returns {Promise<void>} * @returns {Promise<void>}
*
* @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) { setVolume (guildID, percent) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {