Update (v2.0.1)

This commit is contained in:
Zerio
2020-11-26 22:11:54 +01:00
committed by GitHub
parent ad5dcfd614
commit fa013cdb0c

View File

@@ -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 },