From 5d33e1aa43444850084b4794b7d870e67dbb474e Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 23 Aug 2021 20:17:13 -0400 Subject: bunch of shit --- src/inhibitors/checks/guildUnavailable.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/inhibitors/checks/guildUnavailable.ts (limited to 'src/inhibitors/checks/guildUnavailable.ts') diff --git a/src/inhibitors/checks/guildUnavailable.ts b/src/inhibitors/checks/guildUnavailable.ts new file mode 100644 index 0000000..0bd1bec --- /dev/null +++ b/src/inhibitors/checks/guildUnavailable.ts @@ -0,0 +1,19 @@ +import { BushInhibitor, BushMessage, BushSlashMessage } from '@lib'; + +export default class GuildUnavailableInhibitor extends BushInhibitor { + public constructor() { + super('guildUnavailable', { + reason: 'guildUnavailable', + type: 'all', + category: 'checks', + priority: 70 + }); + } + + public override async exec(message: BushMessage | BushSlashMessage): Promise { + if (message.guild && !message.guild.available) { + return true; + } + return false; + } +} -- cgit