findTopLevelSlashCommand

Returns the TopLevelSlashCommandInfo with the specified name 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

name

Name of the top-level slash command