diff options
Diffstat (limited to 'src/inhibitors/command/globalDisabledCommand.ts')
-rw-r--r-- | src/inhibitors/command/globalDisabledCommand.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/inhibitors/command/globalDisabledCommand.ts b/src/inhibitors/command/globalDisabledCommand.ts deleted file mode 100644 index 4a93f2f..0000000 --- a/src/inhibitors/command/globalDisabledCommand.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib'; - -export default class DisabledGuildCommandInhibitor extends BotInhibitor { - public constructor() { - super('disabledGlobalCommand', { - reason: 'disabledGlobal', - type: 'post', - priority: 300 - }); - } - - public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> { - if (message.author.isOwner()) return false; - if (this.client.cache.global.disabledCommands.includes(command?.id)) { - void this.client.console.verbose( - 'disabledGlobalCommand', - `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` - ); - return true; - } - return false; - } -} |