aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo/BushInhibitor.ts
blob: b4e6797b52d6ebc4d5626a9fdc2836a5619a04f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { type BushClient, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
import { Inhibitor } from 'discord-akairo';

export abstract class BushInhibitor extends Inhibitor {
	public declare client: BushClient;

	/**
	 * 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 `message.util` defined.
	 *
	 * @param message - Message being handled.
	 * @param command - Command to check.
	 */
	public abstract override exec(message: CommandMessage, command: BushCommand): any;
	public abstract override exec(message: CommandMessage | SlashMessage, command: BushCommand): any;
}