From 6d23063a30e2fb88cd490e0d4afdd1daca136963 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Sat, 23 Nov 2019 15:03:08 +0200 Subject: [PATCH] fixed dev bypass --- commands/loop.js | 2 +- commands/pause.js | 2 +- commands/playlist.js | 2 +- commands/remove.js | 2 +- commands/resume.js | 2 +- commands/settings.js | 2 +- commands/skip.js | 2 +- commands/stop.js | 2 +- commands/volume.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/commands/loop.js b/commands/loop.js index 227d9c03..98a4a76e 100644 --- a/commands/loop.js +++ b/commands/loop.js @@ -10,7 +10,7 @@ module.exports = { const { voiceChannel } = message.member; if (!serverQueue) return message.channel.send(':x: There is nothing playing.'); if (serverQueue.playing) { - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to loop the queue!'); if (client.global.db.guilds[message.guild.id].permissions === true) { if (client.global.db.guilds[message.guild.id].dj) { diff --git a/commands/pause.js b/commands/pause.js index 03d3510e..c8f37a9f 100644 --- a/commands/pause.js +++ b/commands/pause.js @@ -11,7 +11,7 @@ module.exports = { if (!serverQueue) return message.channel.send(':x: There is nothing playing.'); if (serverQueue.playing && !serverQueue.paused) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to pause the music!'); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (client.global.db.guilds[message.guild.id].permissions === true) { 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!'); diff --git a/commands/playlist.js b/commands/playlist.js index 6e742bc9..3fe857b0 100644 --- a/commands/playlist.js +++ b/commands/playlist.js @@ -20,7 +20,7 @@ module.exports = { .setAuthor(client.user.username, client.user.displayAvatarURL) .setColor('#b50002') const permissions = message.channel.permissionsFor(message.author); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { 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!'); diff --git a/commands/remove.js b/commands/remove.js index f25fbf57..afed315e 100644 --- a/commands/remove.js +++ b/commands/remove.js @@ -15,7 +15,7 @@ module.exports = { if (isNaN(pos)) return message.channel.send(':x: You need to enter a number!'); if (pos === 0) return message.channel.send(':x: You can not remove the currently playing song!'); if (pos > serverQueue.songs.size) return message.channel.send(`:x: There is only ${serverQueue.songs.size} amount of songs in the queue!`); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to remove songs!'); if (client.global.db.guilds[message.guild.id].dj) { if (serverQueue.songs[pos].author !== message.author) { diff --git a/commands/resume.js b/commands/resume.js index 6e6b5261..46da21fd 100644 --- a/commands/resume.js +++ b/commands/resume.js @@ -10,7 +10,7 @@ module.exports = { const { voiceChannel } = message.member; if (!serverQueue) return message.channel.send(':x: There is nothing playing.'); if (serverQueue.playing && serverQueue.paused) { - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to loop the queue!'); if (client.global.db.guilds[message.guild.id].permissions === true) { if (client.global.db.guilds[message.guild.id].dj) { diff --git a/commands/settings.js b/commands/settings.js index cde5a8ee..d24531e5 100644 --- a/commands/settings.js +++ b/commands/settings.js @@ -18,7 +18,7 @@ module.exports = { .setAuthor(client.user.username, client.user.displayAvatarURL) .setColor('#b50002') const permissions = message.channel.permissionsFor(message.author); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to change the settings!'); } if (args[1]) { diff --git a/commands/skip.js b/commands/skip.js index 0644bd04..0f05ec3c 100644 --- a/commands/skip.js +++ b/commands/skip.js @@ -10,7 +10,7 @@ module.exports = { const permissions = message.channel.permissionsFor(message.author); if (!serverQueue) return message.channel.send(':x: There is nothing playing that I could skip for you.'); if (!serverQueue.playing) return message.channel.send(':x: There is nothing playing that I could skip for you.'); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to skip the song!'); if (client.global.db.guilds[message.guild.id].permissions === true) { if (!message.member.roles.has(client.global.db.guilds[message.guild.id].djrole) && !permissions.has('MANAGE_MESSAGES')) { diff --git a/commands/stop.js b/commands/stop.js index abe1dda7..1edf62ec 100644 --- a/commands/stop.js +++ b/commands/stop.js @@ -10,7 +10,7 @@ module.exports = { const permissions = message.channel.permissionsFor(message.author); if (!serverQueue) return message.channel.send(':x: There is nothing playing that I could stop for you.'); if (!serverQueue.playing) return message.channel.send(':x: There is nothing playing that I could stop for you.'); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voice channel as Musix to stop the music!'); if (client.global.db.guilds[message.guild.id].permissions === true) { if (client.global.db.guilds[message.guild.id].dj) { diff --git a/commands/volume.js b/commands/volume.js index f2cb7f2e..8cb6fa0b 100644 --- a/commands/volume.js +++ b/commands/volume.js @@ -12,7 +12,7 @@ module.exports = { if (!serverQueue.playing) return message.channel.send(':x: There is nothing playing.'); if (!args[1]) return message.channel.send(`:loud_sound: The current volume is: **${serverQueue.volume}**`); const volume = parseFloat(args[1]); - if (message.author.id !== client.config.dev) { + if (message.author.id !== client.config.devId) { if (!voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in a voice channel to change the volume!'); if (client.global.db.guilds[message.guild.id].permissions === true) { if (client.global.db.guilds[message.guild.id].dj) {