From 9e329c8aa6a6ba7d2374fd8327db41820a985e65 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 21 Jun 2020 17:19:14 +0200 Subject: [PATCH] :pencil: Add example for shuffle method --- src/Player.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Player.js b/src/Player.js index f9af26c..92dc9e3 100644 --- a/src/Player.js +++ b/src/Player.js @@ -356,6 +356,19 @@ class Player { * Shuffle the guild queue (except the first track) * @param {Discord.Snowflake} guildID The ID of the guild where the queue should be shuffled * @returns {Promise} The updated queue + * + * @example + * client.on('message', async (message) => { + * const args = message.content.slice(settings.prefix.length).trim().split(/ +/g); + * const command = args.shift().toLowerCase(); + * + * if(command === 'shuffle'){ + * // Shuffle the server queue + * client.player.shuffle(message.guild.id).then(() => { + * message.channel.send('Queue shuffled!'); + * }); + * } + * }); */ shuffle (guildID) { return new Promise((resolve, reject) => {