diff options
Diffstat (limited to 'commands/voice/queue.js')
| -rw-r--r-- | commands/voice/queue.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/commands/voice/queue.js b/commands/voice/queue.js new file mode 100644 index 0000000..9d9d3f3 --- /dev/null +++ b/commands/voice/queue.js @@ -0,0 +1,29 @@ +const { Command } = require('discord.js-commando'); + +module.exports = class QueueVoice extends Command { + constructor(client) { + super(client, { + name: 'queue', + aliases: ['q', 'song-list', 'next-songs'], + group: 'voice', + memberName: 'queue', + description: 'display song queue', + guildOnly: true + }); + } + run(msg) { + if (msg.guild.musicData.queue.length == 0) + return msg.say('there are no songs in the queue lol'); + const titleArray = []; + msg.guild.musicData.queue.map(obj => { + titleArray.push(obj.title); + }); + var queueEmbed = new MessageEmbed() + .setColor(0xF97DAE) + .setTitle('Music Queue'); + for (let i = 0; i < titleArray.length; i++) { + queueEmbed.addField(`${i + 1}:`, `${titleArray[i]}`); + } + return msg.say(queueEmbed); + } +};
\ No newline at end of file |