✨ New command progress
This commit is contained in:
19
commands/music/progress.js
Normal file
19
commands/music/progress.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
name: 'progress',
|
||||
aliases: ['pbar'],
|
||||
utilisation: '{prefix}progress',
|
||||
voiceChannel: true,
|
||||
|
||||
async execute(client, message) {
|
||||
const queue = player.getQueue(message.guild.id);
|
||||
|
||||
if (!queue || !queue.playing) return message.channel.send(`No music currently playing ${message.author}... try again ? ❌`);
|
||||
|
||||
const progress = queue.createProgressBar();
|
||||
const timestamp = queue.getPlayerTimestamp();
|
||||
|
||||
if (timestamp.progress == 'Infinity') return message.channel.send(`Playing a live, no data to display 🎧`);
|
||||
|
||||
message.channel.send(`${progress} (**${timestamp.progress}**%)`);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user