diff options
Diffstat (limited to 'lib/extensions/discord-akairo/BotInhibitor.ts')
-rw-r--r-- | lib/extensions/discord-akairo/BotInhibitor.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/extensions/discord-akairo/BotInhibitor.ts b/lib/extensions/discord-akairo/BotInhibitor.ts new file mode 100644 index 0000000..d134eab --- /dev/null +++ b/lib/extensions/discord-akairo/BotInhibitor.ts @@ -0,0 +1,18 @@ +import { type BotCommand, type CommandMessage, type SlashMessage } from '#lib'; +import { Inhibitor } from 'discord-akairo'; +import { Message } from 'discord.js'; + +export abstract class BotInhibitor extends Inhibitor { + /** + * Checks if message should be blocked. + * A return value of true will block the message. + * If returning a Promise, a resolved value of true will block the message. + * + * **Note:** `'all'` type inhibitors do not have {@link Message.util} defined. + * + * @param message - Message being handled. + * @param command - Command to check. + */ + public abstract override exec(message: CommandMessage, command: BotCommand): any; + public abstract override exec(message: CommandMessage | SlashMessage, command: BotCommand): any; +} |