From 597c0167134b157c0846d488a0fa68d1b0ab0024 Mon Sep 17 00:00:00 2001 From: Zerio Date: Sat, 25 Sep 2021 18:13:53 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20New=20command=20progress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/music/progress.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 commands/music/progress.js diff --git a/commands/music/progress.js b/commands/music/progress.js new file mode 100644 index 0000000..73cb402 --- /dev/null +++ b/commands/music/progress.js @@ -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}**%)`); + }, +}; \ No newline at end of file