Package org.javacord.api.interaction
Class SlashCommandOptionChoiceBuilder
- java.lang.Object
-
- org.javacord.api.interaction.SlashCommandOptionChoiceBuilder
-
public class SlashCommandOptionChoiceBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SlashCommandOptionChoiceBuilder()Creates a new slash command option choice builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SlashCommandOptionChoiceBuilderaddNameLocalization(DiscordLocale locale, java.lang.String localization)Adds a name localization for the given locale.SlashCommandOptionChoicebuild()Builds the slash command option choice.SlashCommandOptionChoiceBuildersetName(java.lang.String name)Sets the name of the slash command option choice.SlashCommandOptionChoiceBuildersetValue(long value)Sets the long value of the slash command option choice.SlashCommandOptionChoiceBuildersetValue(java.lang.String value)Sets the string value of the slash command option choice.
-
-
-
Method Detail
-
setName
public SlashCommandOptionChoiceBuilder setName(java.lang.String name)
Sets the name of the slash command option choice.- Parameters:
name- The name.- Returns:
- The current instance in order to chain call methods.
-
addNameLocalization
public SlashCommandOptionChoiceBuilder addNameLocalization(DiscordLocale locale, java.lang.String localization)
Adds a name localization for the given locale.- Parameters:
locale- The locale to add this localization for.localization- The choice name localization.- Returns:
- The current instance in order to chain call methods.
-
setValue
public SlashCommandOptionChoiceBuilder setValue(java.lang.String value)
Sets the string value of the slash command option choice.- Parameters:
value- The value.- Returns:
- The current instance in order to chain call methods.
-
setValue
public SlashCommandOptionChoiceBuilder setValue(long value)
Sets the long value of the slash command option choice. Can be any long between -2^53 and 2^53.- Parameters:
value- The value.- Returns:
- The current instance in order to chain call methods.
-
build
public SlashCommandOptionChoice build()
Builds the slash command option choice.- Returns:
- The slash command option choice.
-
-