aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/commands/guildDisabledCommand.ts
diff options
context:
space:
mode:
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;
- }
-}