1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 06:16:00 +00:00

DJ role support

This commit is contained in:
MatteZ02
2019-10-13 10:33:59 +03:00
parent 1b4dd3921b
commit ca61906f57
13 changed files with 64 additions and 14 deletions

View File

@ -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;