Interface CommandHandlerOptions

Options for configuring a command handler.

Hierarchy

  • CommandHandlerOptions

Properties

client: Client<boolean>

The Discord.js client instance.

commands: {
    ButtonCommands?: string;
    ChatInputCommands?: string;
    MessageCommands?: string;
    SelectMenuCommands?: string;
}

An object mapping command types to their respective directory names.

Remarks

Each command type should be mapped to a directory name containing the files and logic for handling that command type.

The paths specified here should be relative to current working directory (process.cwd())

If any of the command types are not provided, the corresponding type of command will not be handled by the handler.

Type declaration

  • Optional ButtonCommands?: string

    The directory name for ButtonCommand type commands.

  • Optional ChatInputCommands?: string

    The directory name for ChatInputCommand type commands.

  • Optional MessageCommands?: string

    The directory name for MessageCommand type commands.

  • Optional SelectMenuCommands?: string

    The directory name for SelectMenuCommand type commands.

logLevel?: LogLevel

The log level to use.

Default Value

LogLevel.ERROR

prefix?: string | string[] | ((message: Message<boolean>) => Awaitable<string | string[]>)

The prefix or array of prefixes for the MessageCommand type commands. This can also be a function that returns the prefix(es) based on the message. This property is required if the MessageCommands property is present.

Generated using TypeDoc