aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-01 20:37:34 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-01 20:37:34 -0400
commit2b06a59c57fdf7aad217d63db875cdb3d8868036 (patch)
tree76fc9ff0f4217c5c4c3a37291dbb8e589da25bcc /src/inhibitors/commands
parentad26ae36bc57ad4fb77c6c3c3e86eb3303f09110 (diff)
downloadtanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.tar.gz
tanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.tar.bz2
tanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.zip
don't judge me part 2 & fix esbuild with eval command
Diffstat (limited to 'src/inhibitors/commands')
-rw-r--r--src/inhibitors/commands/disabledCommand.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inhibitors/commands/disabledCommand.ts b/src/inhibitors/commands/disabledCommand.ts
index 5b47ce3..6936a41 100644
--- a/src/inhibitors/commands/disabledCommand.ts
+++ b/src/inhibitors/commands/disabledCommand.ts
@@ -4,7 +4,7 @@ import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashM
import { BushMessage } from '../../lib/extensions/discord.js/BushMessage';
export default class DisabledCommandInhibitor extends BushInhibitor {
- constructor() {
+ public constructor() {
super('disabledCommand', {
reason: 'disabled',
type: 'pre',
@@ -14,6 +14,9 @@ export default class DisabledCommandInhibitor extends BushInhibitor {
public async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> {
if (this.client.isOwner(message.author)) return false;
- return this.client.cache.global.disabledCommands.includes(command?.id);
+ if (this.client.cache.global.disabledCommands.includes(command?.id)) {
+ this.client.console.debug(`DisabledCommandInhibitor blocked message.`);
+ return true;
+ }
}
}