📝 Add an example for createProgessBar method

This commit is contained in:
Androz2091 2020-06-24 11:31:19 +02:00
parent 09eddf27c7
commit 86cedbafad

View file

@ -651,10 +651,25 @@ class Player {
}
/**
* Creates progress bar of the current song
* @param {Discord.Snowflake} guildID
* @returns {String}
*/
* Creates progress bar of the current song
* @param {Discord.Snowflake} guildID
* @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) {
// Gets guild queue
const queue = this.queues.find((g) => g.guildID === guildID)