diff --git a/commands/queue.js b/commands/queue.js index 55d565d..533a9fb 100644 --- a/commands/queue.js +++ b/commands/queue.js @@ -1,24 +1,23 @@ const emotes = require ("../config/emojis.json"); +const Discord = require("discord.js") -module.exports.run = async (client, message) => { +exports.run = async (client, message, args) => { - if(!message.member.voice.channel) return message.channel.send(`**You're not in a voice channel ${emotes.error}**`); + //If the member is not in a voice channel + if(!message.member.voice.channel) return message.channel.send(`You're not in a voice channel ${emotes.error}`); + //Get queue const queue = client.player.getQueue(message.guild.id); - if(!queue) return message.channel.send(`**No tracks currently playing ${emotes.error}**`); + //If there's no music + if(!queue) return message.channel.send(`No songs currently playing ${emotes.error}`); - message.channel.send(`**Server queue ${emotes.queue}** \nCurrent - ${queue.playing.name} | ${queue.playing.author}\n`+ + //Message + message.channel.send(`**Server queue ${emotes.queue}**\nCurrent - ${queue.playing.name} | ${queue.playing.author}\n`+ ( queue.tracks.map((track, i) => { return `#${i+1} - ${track.name} | ${track.author}` }).join('\n') )); -}; - - -module.exports.config = { - name: "queue", - aliases: [] -}; +}