diff --git a/commands/MUSIC COMMANDS/join.js b/commands/MUSIC COMMANDS/join.js index 812363de..f8587a95 100644 --- a/commands/MUSIC COMMANDS/join.js +++ b/commands/MUSIC COMMANDS/join.js @@ -21,7 +21,7 @@ module.exports = { if(message.guild.me.voice.channel) return functions.embedbuilder(client, 5000, message, config.colors.no, " I am already connected somewhere") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //try to join the channel diff --git a/commands/MUSIC COMMANDS/play.js b/commands/MUSIC COMMANDS/play.js index 0d7f6738..e39be3a6 100644 --- a/commands/MUSIC COMMANDS/play.js +++ b/commands/MUSIC COMMANDS/play.js @@ -28,7 +28,7 @@ module.exports = { if (!args[0]) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " Please add something you wanna search to") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if(!message.guild.me.voice.channel) @@ -38,7 +38,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") //send information message functions.embedbuilder(client, 5000, message, config.colors.yes, "<:Playing:769665713124016128> Searching!", "```" + args.join(" ") + "```") diff --git a/commands/MUSIC COMMANDS/playsc.js b/commands/MUSIC COMMANDS/playsc.js index 18c33e59..5b5783ab 100644 --- a/commands/MUSIC COMMANDS/playsc.js +++ b/commands/MUSIC COMMANDS/playsc.js @@ -23,7 +23,7 @@ module.exports = { if (!args[0]) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " Please add something you wanna search to") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if(!message.guild.me.voice.channel) @@ -33,7 +33,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") //send information message functions.embedbuilder(client, 5000, message, config.colors.yes, "<:soundcloud:792137871662252103> Searching!", "```" + args.join(" ") + "```") diff --git a/commands/MUSIC COMMANDS/playskip.js b/commands/MUSIC COMMANDS/playskip.js index eb94cce4..775962fa 100644 --- a/commands/MUSIC COMMANDS/playskip.js +++ b/commands/MUSIC COMMANDS/playskip.js @@ -24,7 +24,7 @@ module.exports = { if (!args[0]) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " Please add something you wanna search to") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if(!message.guild.me.voice.channel) @@ -34,7 +34,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") //if bot not connected use play if (!message.guild.me.voice.channel) { diff --git a/commands/MUSIC COMMANDS/radio.js b/commands/MUSIC COMMANDS/radio.js index 81534d78..fcab75e3 100644 --- a/commands/MUSIC COMMANDS/radio.js +++ b/commands/MUSIC COMMANDS/radio.js @@ -7,7 +7,7 @@ module.exports = { description: "Play one of the 200 Radio Station, or see them by just typing +radio in the chat!", run: async (client, message, args) => { //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if (!message.guild.me.voice.channel) @@ -17,7 +17,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") if (message.guild.me.voice.channel && args[0]) { diff --git a/commands/MUSIC COMMANDS/search.js b/commands/MUSIC COMMANDS/search.js index e2b314c5..aaca9e5b 100644 --- a/commands/MUSIC COMMANDS/search.js +++ b/commands/MUSIC COMMANDS/search.js @@ -22,7 +22,7 @@ module.exports = { if (!args[0]) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " Please add something you wanna search to") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if(!message.guild.me.voice.channel) @@ -32,7 +32,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") //send information message diff --git a/commands/MUSIC COMMANDS/searchsc.js b/commands/MUSIC COMMANDS/searchsc.js index c32e0a1f..15f141b8 100644 --- a/commands/MUSIC COMMANDS/searchsc.js +++ b/commands/MUSIC COMMANDS/searchsc.js @@ -22,7 +22,7 @@ module.exports = { if (!args[0]) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " Please add something you wanna search to") //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("CONNECT")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`join\` your Channel") //If bot not connected, join the channel if(!message.guild.me.voice.channel) @@ -32,7 +32,7 @@ module.exports = { }) //if not allowed to CONNECT to the CHANNEL - if (message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") + if (!message.guild.me.permissionsIn(message.member.voice.channel).has("SPEAK")) return functions.embedbuilder(client, 5000, message, config.colors.no, "`" + message.author.tag + "`" + " I am not allowed to \`speak\` your Channel") //send information message diff --git a/index.js b/index.js index bc2abd60..9f4440b7 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ client.on("message", async message => { prefix = matchedPrefix; if (!message.content.startsWith(prefix) && message.content.includes(client.user.id)) - if (message.guild.me.permissionsIn(message.channel).has("EMBED_LINKS")) + if (!message.guild.me.permissionsIn(message.channel).has("EMBED_LINKS")) message.reply(new Discord.MessageEmbed().setColor(config.colors.yes).setAuthor(`${message.author.username}, My prefix is ${prefix}, to get started; type ${prefix}help`, message.author.displayAvatarURL({ dynamic: true }), "https://dc.musicium.eu")); @@ -109,7 +109,7 @@ client.on("message", async message => { if (!message.content.startsWith(prefix)) return; //if not allowed to send embeds, return that - if (message.guild.me.permissionsIn(message.channel).has("EMBED_LINKS")) + if (!message.guild.me.permissionsIn(message.channel).has("EMBED_LINKS")) return message.reply("**:x: I am missing the Permission to `EMBED_LINKS`**") //CHECK IF IN A BOT CHANNEL OR NOT