messageCommand

fun messageCommand(name: String, function: KFunction<Any>, builder: MessageCommandBuilder.() -> Unit)(source)

Declares the supplied function as a message context command.

The targeted function must have a GlobalMessageEvent or a GuildMessageEvent, with the only accepted option being Message, which will be the targeted message.

Requirements

The first parameter must be:

The default allowed interaction contexts and integration types can be redefined in the corresponding command manager.

See the Discord docs for more details.

See also

GlobalMessageEvent.getTarget

@JDAMessageCommand