user Command
fun userCommand(name: String, function: KFunction<Any>, builder: UserCommandBuilder.() -> Unit)(source)
Declares the supplied function as a user context command.
The targeted function must have a GlobalUserEvent or a GuildUserEvent, with the only accepted options being Member, User and InputUser, which will be the targeted entity.
Requirements
The first parameter must be:
GuildUserEvent if the interaction context only contains InteractionContextType.GUILD.
GlobalUserEvent 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.