📝 Add example for the nowPlaying method
This commit is contained in:
parent
a3b32d30c5
commit
7fa041bb22
1 changed files with 13 additions and 0 deletions
|
@ -322,6 +322,19 @@ class Player {
|
|||
* Get the currently playing track
|
||||
* @param {Discord.Snowflake} guildID
|
||||
* @returns {Promise<Track>} The track which is currently played
|
||||
*
|
||||
* @example
|
||||
* client.on('message', async (message) => {
|
||||
*
|
||||
* const args = message.content.slice(settings.prefix.length).trim().split(/ +/g);
|
||||
* const command = args.shift().toLowerCase();
|
||||
*
|
||||
* if(command === 'now-playing'){
|
||||
* let track = await client.player.nowPlaying(message.guild.id);
|
||||
* message.channel.send(`Currently playing ${track.name}...`);
|
||||
* }
|
||||
*
|
||||
* });
|
||||
*/
|
||||
nowPlaying (guildID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
Loading…
Reference in a new issue