📝 Add example for pause method
This commit is contained in:
parent
07e07f0d63
commit
248042de33
1 changed files with 13 additions and 0 deletions
|
@ -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<Track>} 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) => {
|
||||
|
|
Loading…
Reference in a new issue