findSlashCommand

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

Returns the SlashCommandInfo with the specified path, if it is published in that scope, either in the guild, or globally.

Parameters

guild

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

path

Full path of the slash command (Examples: ban ; info user ; ban user perm)