From 42b80da79111924ffb5620eaef99fb5e2446eca8 Mon Sep 17 00:00:00 2001 From: GramingFoxTeam Date: Thu, 10 Aug 2023 15:49:43 +0300 Subject: [PATCH] fix(bot-discord): fix permission checking --- apps/bot-discord/src/commands/ban.js | 2 +- apps/bot-discord/src/commands/exile.js | 2 +- apps/bot-discord/src/commands/unban.js | 2 +- apps/bot-discord/src/commands/unexile.js | 2 +- apps/bot-discord/src/commands/unmute.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/bot-discord/src/commands/ban.js b/apps/bot-discord/src/commands/ban.js index d429f69..7832bac 100644 --- a/apps/bot-discord/src/commands/ban.js +++ b/apps/bot-discord/src/commands/ban.js @@ -24,7 +24,7 @@ export default { .setDescription('Reason for the ban') ), async execute(_, config, interaction) { - if (!checkForPerms(config, interaction.member)) return interaction.reply({ + if (checkForPerms(config, interaction.member)) return interaction.reply({ epheremal: true, content: 'You don\'t have the required permissions.' }); diff --git a/apps/bot-discord/src/commands/exile.js b/apps/bot-discord/src/commands/exile.js index e47fa70..e25d395 100644 --- a/apps/bot-discord/src/commands/exile.js +++ b/apps/bot-discord/src/commands/exile.js @@ -21,7 +21,7 @@ export default { .setRequired(true) ), async execute(_, config, interaction) { - if (!checkForPerms(config, interaction.member)) return interaction.reply({ + if (checkForPerms(config, interaction.member)) return interaction.reply({ epheremal: true, content: 'You don\'t have the required permissions.' }); diff --git a/apps/bot-discord/src/commands/unban.js b/apps/bot-discord/src/commands/unban.js index 1157ff5..c372b2d 100644 --- a/apps/bot-discord/src/commands/unban.js +++ b/apps/bot-discord/src/commands/unban.js @@ -14,7 +14,7 @@ export default { .setRequired(true) ), async execute(_, config, interaction) { - if (!checkForPerms(config, interaction.member)) return interaction.reply({ + if (checkForPerms(config, interaction.member)) return interaction.reply({ epheremal: true, content: 'You don\'t have the required permissions.' }); diff --git a/apps/bot-discord/src/commands/unexile.js b/apps/bot-discord/src/commands/unexile.js index d1b5629..ccd9759 100644 --- a/apps/bot-discord/src/commands/unexile.js +++ b/apps/bot-discord/src/commands/unexile.js @@ -15,7 +15,7 @@ export default { .setRequired(true) ), async execute(_, config, interaction) { - if (!checkForPerms(config, interaction.member)) return interaction.reply({ + if (checkForPerms(config, interaction.member)) return interaction.reply({ epheremal: true, content: 'You don\'t have the required permissions.' }); diff --git a/apps/bot-discord/src/commands/unmute.js b/apps/bot-discord/src/commands/unmute.js index bc480b8..e9d0d5d 100644 --- a/apps/bot-discord/src/commands/unmute.js +++ b/apps/bot-discord/src/commands/unmute.js @@ -15,7 +15,7 @@ export default { .setRequired(true) ), async execute(_, config, interaction) { - if (!checkForPerms(config, interaction.member)) return interaction.reply({ + if (checkForPerms(config, interaction.member)) return interaction.reply({ epheremal: true, content: 'You don\'t have the required permissions.' });