Lanbot_Music/commands/music/progress.js

19 lines
665 B
JavaScript
Raw Normal View History

2022-04-03 04:34:37 +02:00
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}**%)`);
},
};