1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 00:23:17 +00:00

Update nowplaying.js

This commit is contained in:
MatteZ02 2020-07-02 18:42:43 +03:00
parent d29c928be6
commit 2fb6267dd9

View File

@ -23,6 +23,7 @@ module.exports = {
for (let i = 0; i < barlength - completedpercent - 1; i++) { for (let i = 0; i < barlength - completedpercent - 1; i++) {
array.push("⎯"); array.push("⎯");
} }
const thumbnail = queue.songs[0].info.thumbnail.thumbnails[4] || queue.songs[0].info.thumbnail.thumbnails[3] || queue.songs[0].info.thumbnail.thumbnails[2] || queue.songs[0].info.thumbnail.thumbnails[1] || queue.songs[0].info.thumbnail.thumbnails[0];
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setTitle(client.messages.nowPlaying) .setTitle(client.messages.nowPlaying)
.setDescription( .setDescription(
@ -35,7 +36,7 @@ module.exports = {
) )
.setFooter(`Queued by ${queue.songs[0].author.tag}`) .setFooter(`Queued by ${queue.songs[0].author.tag}`)
.setURL(queue.songs[0].url) .setURL(queue.songs[0].url)
.setThumbnail(queue.songs[0].info.thumbnail.thumbnails[4].url || queue.songs[0].info.thumbnail.thumbnails[3].url || queue.songs[0].info.thumbnail.thumbnails[2].url || queue.songs[0].info.thumbnail.thumbnails[1].url || queue.songs[0].info.thumbnail.thumbnails[0].url) .setThumbnail(thumbnail.url)
.setColor(client.config.embedColor); .setColor(client.config.embedColor);
if (queue.nigthCore) if (queue.nigthCore)
embed.setDescription( embed.setDescription(