From a15ad3a8e91e78e3d53f4a91d25b46a64cc6b9ee Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 19 Mar 2020 15:44:00 +0100 Subject: [PATCH] Let administrator bypass block too --- event/inhibitors/commandBlock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/inhibitors/commandBlock.js b/event/inhibitors/commandBlock.js index fc7d2861..e9f937b1 100644 --- a/event/inhibitors/commandBlock.js +++ b/event/inhibitors/commandBlock.js @@ -9,7 +9,7 @@ class commandblockInhibitor extends Inhibitor { } async exec(message, command) { - if (message.channel.type == 'dm' || message.author.id == this.client.ownerID) return false; + if (message.channel.type == 'dm' || message.author.id == this.client.ownerID || message.member.hasPermission('ADMINISTRATOR')) return false; const blacklist = await commandblock.findOne({where: {serverID:message.guild.id, command: command.id}}); if (blacklist) return true;