From fa013cdb0cc7739ccc39fd7baf9813da527d731c Mon Sep 17 00:00:00 2001 From: Zerio <43386412+ZerioDev@users.noreply.github.com> Date: Thu, 26 Nov 2020 22:11:54 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Update=20(v2.0.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/np.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/commands/np.js b/commands/np.js index 6df8805..5fe032e 100644 --- a/commands/np.js +++ b/commands/np.js @@ -1,12 +1,15 @@ -const emotes = require("../config/emojis.json"); - exports.run = async (client, message) => { - if (!message.member.voice.channel) return message.channel.send(`You're not in a voice channel ${emotes.error}`); + if (!message.member.voice.channel) return message.channel.send(`${client.emotes.error} - You're not in a voice channel !`); - if (!client.player.getQueue(message)) return message.channel.send(`No music playing on this server ${emotes.error}`); + if (!client.player.getQueue(message)) return message.channel.send(`${client.emotes.error} - No songs currently playing !`); const track = await client.player.nowPlaying(message); + const filters = []; + + Object.keys(client.player.getQueue(message).filters).forEach((filterName) => { + if (client.player.getQueue(message).filters[filterName]) filters.push(filterName); + }); message.channel.send({ embed: { @@ -17,6 +20,11 @@ exports.run = async (client, message) => { { name: 'Channel', value: track.author, inline: true }, { name: 'Requested by', value: track.requestedBy.username, inline: true }, { name: 'From playlist', value: track.fromPlaylist ? 'Yes' : 'No', inline: true }, + + { name: 'Views', value: track.views, inline: true }, + { name: 'Duration', value: track.duration, inline: true }, + { name: 'Filters activated', value: filters.length, inline: true }, + { name: 'Progress bar', value: client.player.createProgressBar(message, { timecodes: true }), inline: true } ], thumbnail: { url: track.thumbnail },