1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 09:26: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

@ -13,7 +13,9 @@ module.exports = {
return message.channel.send(':x: This command is currently disabled!');
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to seek the song!');
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 seek the song!');
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 seek the song!');
} else if (!permissions.has('MANAGE_MESSAGES')) return message.channel.send(':x: You need the `MANAGE_MESSAGES` permission to seek the song!');
}
}
if (!args[1]) return message.channel.send(`:x: Correct usage: \`${prefix}seek <seeking point in seconds>\``);