findMessageCommand

abstract fun findMessageCommand(guild: Guild?, name: String): MessageCommandInfo?(source)

Returns the MessageCommandInfo with the specified name.

If guild is not null, only commands from the guild are considered, otherwise only global commands are considered.

Parameters

guild

The guild from which to get the command, can be null for global commands

name

Name of the message context command