Class Choice
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.util.Choice
-
public class Choice extends java.lang.ObjectA helper data class that stores data for creating aSlashCommandOptionChoice
-
-
Constructor Summary
Constructors Constructor Description Choice(java.lang.String key, java.lang.Object value)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.javacord.api.interaction.SlashCommandOptionChoicegetChoice()Constructs theSlashCommandOptionChoiceinstancejava.lang.StringgetKey()java.lang.ObjectgetValue()java.lang.LonggetValueAsLong()java.lang.StringgetValueAsString()
-
-
-
Constructor Detail
-
Choice
public Choice(java.lang.String key, java.lang.Object value)Default constructor- Parameters:
key- the choice's key (the user will see this)value- the choice's value can beStringorNumberNOTE: Discord accepts onlyLongtype, thereforeNumber.longValue()is used That means, decimals are not supported!
-
-
Method Detail
-
getKey
public java.lang.String getKey()
-
getValue
public java.lang.Object getValue()
-
getValueAsString
public java.lang.String getValueAsString()
-
getValueAsLong
public java.lang.Long getValueAsLong()
-
getChoice
public org.javacord.api.interaction.SlashCommandOptionChoice getChoice()
Constructs theSlashCommandOptionChoiceinstance- Returns:
- the
SlashCommandOptionChoice
-
-