From 8f9e6ca9d17535138fccda158534bb6a908f4563 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 21 Jun 2020 17:29:20 +0200 Subject: [PATCH] :pencil: Add example for clearQueue method --- src/Player.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index 54150bf..1bf1769 100644 --- a/src/Player.js +++ b/src/Player.js @@ -282,9 +282,22 @@ class Player { } /** - * Clear the guild queue, but not the current track + * Clear the guild queue, except the current track * @param {Discord.Snowflake} guildID The ID of the guild where the queue should be cleared * @returns {Promise} The updated queue + * + * @example + * client.on('message', (message) => { + * + * const args = message.content.slice(settings.prefix.length).trim().split(/ +/g); + * const command = args.shift().toLowerCase(); + * + * if(command === 'clear-queue'){ + * client.player.clearQueue(message.guild.id); + * message.channel.send('Queue cleared!'); + * } + * + * }); */ clearQueue (guildID) { return new Promise((resolve, reject) => {