message Command
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:
GuildMessageEvent if the interaction context only contains InteractionContextType.GUILD.
GlobalMessageEvent in other cases.
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
Global Message Event. getTarget
@JDAMessageCommand