diff options
Diffstat (limited to 'src/inhibitors/command/dm.ts')
-rw-r--r-- | src/inhibitors/command/dm.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/inhibitors/command/dm.ts b/src/inhibitors/command/dm.ts new file mode 100644 index 0000000..4e9c53e --- /dev/null +++ b/src/inhibitors/command/dm.ts @@ -0,0 +1,19 @@ +import { BushCommand, BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; + +export default class DMInhibitor extends BushInhibitor { + public constructor() { + super('dm', { + reason: 'dm', + category: 'command', + type: 'post', + priority: 75 + }); + } + + public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { + if (command.channel === 'dm' && message.guild) { + return true; + } + return false; + } +} |