ChatCommandsBuilder

Builder used for configuring the bot's chat command options.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

List of command checks.

Link copied to clipboard

Prefix to require for command invocations on Discord. Defaults to "!".

Link copied to clipboard

Whether to register and process chat commands. Defaults to false.

Link copied to clipboard

Whether to ignore command invocations in messages sent by the bot. Defaults to true.

Link copied to clipboard

Whether to invoke commands on bot mentions, in addition to using chat prefixes. Defaults to true.

Functions

Link copied to clipboard
fun check(vararg checks: ChatCommandCheck)

Define a check which must pass for the command to be executed. This check will be applied to all commands.

Overloaded check function to allow for DSL syntax.

Link copied to clipboard
fun prefix(builder: suspend MessageCreateEvent.(String) -> String)

Register a lambda that takes a MessageCreateEvent object and the default prefix, and returns the command prefix to be made use of for that message event.

Link copied to clipboard
fun registry(builder: () -> ChatCommandRegistry)

Register the builder used to create the ChatCommandRegistry. You can change this if you need to make use of a subclass.