Class Command.Option
- java.lang.Object
-
- net.dv8tion.jda.api.interactions.commands.Command.Option
-
-
Constructor Summary
Constructors Constructor Description Option(DataObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<Command.Choice>
getChoices()
The predefined choices available for this option.String
getDescription()
The description of this option, subcommand, or subcommand group.String
getName()
The name of this option, subcommand, or subcommand group.OptionType
getType()
TheOptionType
.int
getTypeRaw()
The raw option type.int
hashCode()
boolean
isRequired()
Whether this option is requiredString
toString()
-
-
-
Constructor Detail
-
Option
public Option(@Nonnull DataObject json)
-
-
Method Detail
-
getName
@Nonnull public String getName()
The name of this option, subcommand, or subcommand group.- Returns:
- The name
-
getDescription
@Nonnull public String getDescription()
The description of this option, subcommand, or subcommand group.- Returns:
- The description
-
getTypeRaw
public int getTypeRaw()
The raw option type.- Returns:
- The type
-
isRequired
public boolean isRequired()
Whether this option is required- Returns:
- True if this option is required
-
getType
@Nonnull public OptionType getType()
TheOptionType
.- Returns:
- The type
-
getChoices
@Nonnull public List<Command.Choice> getChoices()
The predefined choices available for this option.
If no choices are defined, this returns an empty list.- Returns:
- Immutable
List
ofCommand.Choice
-
-