From 248042de33779601c3c86290a1a885d2b94cd6d1 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 21 Jun 2020 17:33:56 +0200 Subject: [PATCH] :pencil: Add example for pause method --- src/Player.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Player.js b/src/Player.js index 976cfaa..e4d1570 100644 --- a/src/Player.js +++ b/src/Player.js @@ -156,6 +156,19 @@ class Player { * Pause the current track * @param {Discord.Snowflake} guildID The ID of the guild where the current track should be paused * @returns {Promise} The paused track + * + * @example + * client.on('message', async (message) => { + * + * const args = message.content.slice(settings.prefix.length).trim().split(/ +/g); + * const command = args.shift().toLowerCase(); + * + * if(command === 'pause'){ + * let track = await client.player.pause(message.guild.id); + * message.channel.send(`${track.name} paused!`); + * } + * + * }); */ pause (guildID) { return new Promise((resolve, reject) => {