findSlashCommand

abstract fun findSlashCommand(guild: Guild?, path: CommandPath): SlashCommandInfo?(source)

Returns the SlashCommandInfo with the specified path and scope.

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

path

Full path of the slash command, see CommandPath.of