getOptionChoices

open fun getOptionChoices(guild: Guild?, commandPath: CommandPath, optionName: String): List<Command.Choice>(source)

Returns the choices available for this command path, on the specific optionName.

The choices returned by this method will have their name localized if they are present in the localization bundles.

Return

The list of choices for this slash command's options

Parameters

guild

The Guild in which the command is, might be null for global commands with choices

commandPath

The CommandPath of the command, this is composed of it's name and optionally of its group and subcommand name

optionName

The option name, not the same as the parameter name, this is the same name that appears on Discord

See also