Slash Option
Sets a parameter as a slash command option from Discord.
Display name
Option names can be inferred from the parameter's name, see the wiki for more details.
Order
Options have the same order on Discord and the method, however, required options must be placed first (i.e., not null, and without a default value).
If the options are unordered, they will be automatically ordered and logged.
Choices
Choices can be added by either their parameter resolver, or the application command itself.
See also
@Optional
@Nullable
@Aggregate
@LongRange
@DoubleRange
@Length
@ChannelTypes
@AutocompleteHandler
@VarArgs
DSL equivalent
Properties
Name of the autocomplete handler.
Description of the option.
Must follow the Discord specifications, see the OptionData constructor for details.
Name of the option.
Must follow the Discord specifications, see the OptionData constructor for details.
Enables using choices from SlashParameterResolver.getPredefinedChoices.