CommandFilter

interface CommandFilter

Runs before permission checks and argument resolution. Return true or undefined to continue, false to stop silently, or a string to stop and reply.

Methods

CommandFilter.check(
context: { commandName: string; commandPath: readonly string[]; interaction: Interaction; kind: “slash”; reply: ; } | { commandName: string; commandPath: readonly string[]; kind: “prefix”; message: GuildMemberMessage; reply: ; } | { commandName: string; commandPath: readonly string[]; interaction: Interaction; kind: “menu”; reply: ; } | { commandName: string; commandPath: readonly string[]; interaction: Interaction; kind: “component”; reply: ; }
) → string | boolean | void | Promise<string | boolean | void>