diff --git a/commands/loop.js b/commands/loop.js index 5376611c..e243fb4d 100644 --- a/commands/loop.js +++ b/commands/loop.js @@ -10,7 +10,9 @@ module.exports = { if (message.author.id !== '360363051792203779') { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to loop the queue!'); if (client.global.db.guilds[message.guild.id].permissions === true) { - if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to loop the queue!'); + if (client.global.db.guilds[message.guild.id].dj) { + if (!message.member.roles.has(client.global.db.guilds[message.guild.id].djrole)) return message.channel.send(':x: You need the `DJ` role to loop the queue!'); + } else if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to loop the queue!'); } } if (!serverQueue.looping) { diff --git a/commands/pause.js b/commands/pause.js index 635076f1..5b0e85a2 100644 --- a/commands/pause.js +++ b/commands/pause.js @@ -10,7 +10,9 @@ module.exports = { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to pause the music!'); if (message.author.id !== '360363051792203779') { if (client.global.db.guilds[message.guild.id].permissions === true) { - if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to pause the music!'); + if (client.global.db.guilds[message.guild.id].dj) { + if (!message.member.roles.has(client.global.db.guilds[message.guild.id].djrole)) return message.channel.send(':x: You need the `DJ` role to pause the music!'); + } else if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to pause the music!'); } } serverQueue.playing = false; diff --git a/commands/playlist.js b/commands/playlist.js index 1e7e8688..56bd5c3d 100644 --- a/commands/playlist.js +++ b/commands/playlist.js @@ -7,7 +7,9 @@ module.exports = { const permissions = message.channel.permissionsFor(message.author); const serverQueue = client.queue.get(message.guild.id); if (message.author.id !== '360363051792203779') { - if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to modify the playlist!'); + if (client.global.db.guilds[message.guild.id].dj) { + if (!message.member.roles.has(client.global.db.guilds[message.guild.id].djrole)) return message.channel.send(':x: You need the `DJ` role to modify or play the playlist!'); + } else if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to modify the playlist!'); } if (client.global.db.guilds[message.guild.id].premium) { if (args[1] === 'play') { @@ -49,7 +51,7 @@ module.exports = { const embed = new Discord.RichEmbed() .setTitle('Options for playlist!') .addField('play', 'Play the guild specific queue.', true) - .addField('save', 'Save the currently playing queue.') + .addField('save', 'Save the currently playing queue.', true) .setFooter(`how to use: ${prefix}playlist