📝 Add an example for createProgessBar method
This commit is contained in:
parent
09eddf27c7
commit
86cedbafad
1 changed files with 19 additions and 4 deletions
|
@ -651,10 +651,25 @@ class Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates progress bar of the current song
|
* Creates progress bar of the current song
|
||||||
* @param {Discord.Snowflake} guildID
|
* @param {Discord.Snowflake} guildID
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*
|
||||||
|
* @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'){
|
||||||
|
* // Shuffle the server queue
|
||||||
|
* client.player.nowPlaying(message.guild.id).then((song) => {
|
||||||
|
* message.channel.send('Currently playing ' + song.name + '\n\n'+ client.player.createProgressBar(message.guild.id));
|
||||||
|
* });
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* });
|
||||||
|
*/
|
||||||
createProgressBar (guildID) {
|
createProgressBar (guildID) {
|
||||||
// Gets guild queue
|
// Gets guild queue
|
||||||
const queue = this.queues.find((g) => g.guildID === guildID)
|
const queue = this.queues.find((g) => g.guildID === guildID)
|
||||||
|
|
Loading…
Reference in a new issue