aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/commands/guildDisabledCommand.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-23 20:17:13 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-23 20:17:13 -0400
commit5d33e1aa43444850084b4794b7d870e67dbb474e (patch)
tree3c98cbb49ce896d0ca3e65b13c5cded0f8580359 /src/inhibitors/commands/guildDisabledCommand.ts
parentfa9e2fea668f0f1aaa766288599393e6816c58bc (diff)
downloadtanzanite-5d33e1aa43444850084b4794b7d870e67dbb474e.tar.gz
tanzanite-5d33e1aa43444850084b4794b7d870e67dbb474e.tar.bz2
tanzanite-5d33e1aa43444850084b4794b7d870e67dbb474e.zip
bunch of shit
Diffstat (limited to 'src/inhibitors/commands/guildDisabledCommand.ts')
-rw-r--r--src/inhibitors/commands/guildDisabledCommand.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/inhibitors/commands/guildDisabledCommand.ts b/src/inhibitors/commands/guildDisabledCommand.ts
deleted file mode 100644
index ee798e5..0000000
--- a/src/inhibitors/commands/guildDisabledCommand.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { BushCommand, BushInhibitor, BushMessage, BushSlashMessage } from '@lib';
-
-export default class DisabledGuildCommandInhibitor extends BushInhibitor {
- public constructor() {
- super('disabledGuildCommand', {
- reason: 'disabledGuild',
- type: 'pre',
- priority: 3
- });
- }
-
- public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> {
- if (!message.guild || !message.guild) return false;
- if (message.author.isOwner() || message.author.isSuperUser()) return false; // super users bypass guild disabled commands
-
- if ((await message.guild.getSetting('disabledCommands'))?.includes(command?.id)) {
- client.console.debug(`disabledGuildCommand blocked message.`);
- return true;
- }
- return false;
- }
-}