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