Skip to content

Commit

Permalink
Update status.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomato6966 authored Sep 15, 2021
1 parent 759a9df commit 8cd5335
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions slashCommands/Queue/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ module.exports = {
],
ephemeral: true
})
var djs = client.settings.get(newQueue.id, `djroles`).map(r => `<@&${r}>`);
if (djs.length == 0) djs = "`not setup`";
var djs = client.settings.get(newQueue.id, `djroles`);
if(!djs || !Array.isArray(djs)) djs = [];
else djs = djs.map(r => `<@&${r}>`);
if(djs.length == 0 ) djs = "`not setup`";
else djs.slice(0, 15).join(", ");
let newTrack = newQueue.songs[0];
let embed = new MessageEmbed().setColor(ee.color)
Expand All @@ -75,7 +77,7 @@ module.exports = {
.addField(`↪️ Autoplay:`, `>>> ${newQueue.autoplay ? `${client.allEmojis.check_mark}` : `${client.allEmojis.x}`}`, true)
.addField(`❔ Download Song:`, `>>> [\`Click here\`](${newTrack.streamURL})`, true)
.addField(`❔ Filter${newQueue.filters.length > 0 ? "s": ""}:`, `>>> ${newQueue.filters && newQueue.filters.length > 0 ? `${newQueue.filters.map(f=>`\`${f}\``).join(`, `)}` : `${client.allEmojis.x}`}`, newQueue.filters.length > 1 ? false : true)
.addField(`🎧 DJ-Role${client.settings.get(newQueue.id, "djroles").length > 1 ? "s": ""}:`, `>>> ${djs}`, client.settings.get(newQueue.id, "djroles").length > 1 ? false : true)
.addField(`🎧 DJ-Role${djs.length > 1 ? "s": ""}:`, `>>> ${djs}`, djs.length > 1 ? false : true)
.setAuthor(`${newTrack.name}`, `https://images-ext-1.discordapp.net/external/DkPCBVBHBDJC8xHHCF2G7-rJXnTwj_qs78udThL8Cy0/%3Fv%3D1/https/cdn.discordapp.com/emojis/859459305152708630.gif`, newTrack.url)
.setThumbnail(`https://img.youtube.com/vi/${newTrack.id}/mqdefault.jpg`)
.setFooter(`💯 ${newTrack.user.tag}`, newTrack.user.displayAvatarURL({
Expand Down

0 comments on commit 8cd5335

Please sign in to comment.