📝 Add example for setVolume method
This commit is contained in:
parent
b8dee7bce2
commit
535d8a43e4
1 changed files with 13 additions and 0 deletions
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in a new issue