blob: ba143eea30f86fb53d9bc7a73604f92a69f5455a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { BushCommand, BushInhibitor, BushMessage, BushSlashMessage } from '../../lib';
export default class DisabledCommandInhibitor extends BushInhibitor {
public constructor() {
super('disabledCommand', {
reason: 'disabled',
type: 'pre',
priority: 3
});
}
public async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> {
if (this.client.isOwner(message.author)) return false;
if (this.client.cache.global.disabledCommands.includes(command?.id)) {
this.client.console.debug(`DisabledCommandInhibitor blocked message.`);
return true;
}
}
}
|