Class Command.Option
- java.lang.Object
- 
- net.dv8tion.jda.api.interactions.commands.Command.Option
 
- 
- Enclosing class:
- Command
 
 public static class Command.Option extends java.lang.ObjectAn Option for a command.
- 
- 
Constructor SummaryConstructors Constructor Description Option(DataObject json)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Set<ChannelType>getChannelTypes()TheChannelTypesthis option is restricted to.java.util.List<Command.Choice>getChoices()The predefined choices available for this option.java.lang.StringgetDescription()The description of this option, subcommand, or subcommand group.java.lang.NumbergetMaxValue()The maximum value which can be provided for this option.java.lang.NumbergetMinValue()The minimum value which can be provided for this option.java.lang.StringgetName()The name of this option, subcommand, or subcommand group.OptionTypegetType()TheOptionType.intgetTypeRaw()The raw option type.inthashCode()booleanisRequired()Whether this option is requiredjava.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
Optionpublic Option(@Nonnull DataObject json)
 
- 
 - 
Method Detail- 
getName@Nonnull public java.lang.String getName() The name of this option, subcommand, or subcommand group.- Returns:
- The name
 
 - 
getDescription@Nonnull public java.lang.String getDescription() The description of this option, subcommand, or subcommand group.- Returns:
- The description
 
 - 
getTypeRawpublic int getTypeRaw() The raw option type.- Returns:
- The type
 
 - 
isRequiredpublic boolean isRequired() Whether this option is required- Returns:
- True if this option is required
 
 - 
getType@Nonnull public OptionType getType() TheOptionType.- Returns:
- The type
 
 - 
getChannelTypes@Nonnull public java.util.Set<ChannelType> getChannelTypes() TheChannelTypesthis option is restricted to.
 This is empty if the option is not of typeCHANNELor not restricted to specific types.- Returns:
- Immutable SetofChannelType
 
 - 
getMinValue@Nullable public java.lang.Number getMinValue() The minimum value which can be provided for this option.
 This returnsnullif the value is not set or if the option is not of typeINTEGERorNUMBER.- Returns:
- The minimum value for this option or null
 
 - 
getMaxValue@Nullable public java.lang.Number getMaxValue() The maximum value which can be provided for this option.
 This returnsnullif the value is not set or if the option is not of typeINTEGERorNUMBER.- Returns:
- The maximum value for this option or null
 
 - 
getChoices@Nonnull public java.util.List<Command.Choice> getChoices() The predefined choices available for this option.
 If no choices are defined, this returns an empty list.- Returns:
- Immutable ListofCommand.Choice
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-