summaryrefslogtreecommitdiff
path: root/commands/voice/queue.js
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-10 10:16:53 -0700
committer8cy <[email protected]>2020-04-10 10:16:53 -0700
commit4b308538961facb87d73fafeab7fab5927562eff (patch)
tree8eaf88c074c379d76e7932e6fc3f32c05adb70ca /commands/voice/queue.js
parentrework reboot, work on itemshop, v1.5.2 (diff)
downloads5nical-4b308538961facb87d73fafeab7fab5927562eff.tar.xz
s5nical-4b308538961facb87d73fafeab7fab5927562eff.zip
port to commando/ v12, 2.0.0
ported everything over to v12 and then commando in the span of 2 days no sleep lol. also now using typescript standard for cool 8)
Diffstat (limited to 'commands/voice/queue.js')
-rw-r--r--commands/voice/queue.js29
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