Interface SlashCommandOptionBuilderDelegate
-
public interface SlashCommandOptionBuilderDelegateThis class is internally used by theSlashCommandOptionBuilder. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChannelType(ChannelType channelType)Add a channel type to the slash command option.voidaddChoice(SlashCommandOptionChoice choice)Adds a choice for the slash command option.voidaddDescriptionLocalization(DiscordLocale locale, java.lang.String localization)Adds a description localization for the given locale.voidaddNameLocalization(DiscordLocale locale, java.lang.String localization)Adds a name localization for the given locale.voidaddOption(SlashCommandOption option)Adds a slash command option to the slash command option.SlashCommandOptionbuild()Build the slash command option.voidsetAutocompletable(boolean autocompletable)Sets if this option can be autocompleted.voidsetChannelTypes(java.util.Collection<ChannelType> channelTypes)Sets the channel types for the slash command option.voidsetChoices(java.util.List<SlashCommandOptionChoice> choices)Sets the choices of the slash command option.voidsetDecimalMaxValue(double decimalMaxValue)Sets theSlashCommandOptionType.DECIMALmax value for the slash command option.voidsetDecimalMinValue(double decimalMinValue)Sets theSlashCommandOptionType.DECIMALmin value for the slash command option.voidsetDescription(java.lang.String description)Sets the description of the slash command option.voidsetLongMaxValue(long longMaxValue)Sets theSlashCommandOptionType.LONGmax value for the slash command option.voidsetLongMinValue(long longMinValue)Sets theSlashCommandOptionType.LONGmin value for the slash command option.voidsetMaxLength(long maxLength)Sets theSlashCommandOptionType.STRINGmax length for the slash command option.voidsetMinLength(long minLength)Sets theSlashCommandOptionType.STRINGmin length for the slash command option.voidsetName(java.lang.String name)Sets the name of the slash command option.voidsetOptions(java.util.List<SlashCommandOption> options)Sets the slash commands for the slash command option.voidsetRequired(boolean required)Sets if the slash command option is required.voidsetType(SlashCommandOptionType type)Sets the type of the slash command option.
-
-
-
Method Detail
-
setType
void setType(SlashCommandOptionType type)
Sets the type of the slash command option.- Parameters:
type- The type.
-
setName
void setName(java.lang.String name)
Sets the name of the slash command option.- Parameters:
name- The name.
-
addNameLocalization
void 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 command name localization.
-
setDescription
void setDescription(java.lang.String description)
Sets the description of the slash command option.- Parameters:
description- The description.
-
addDescriptionLocalization
void addDescriptionLocalization(DiscordLocale locale, java.lang.String localization)
Adds a description localization for the given locale.- Parameters:
locale- The locale to add this localization for.localization- The command description localization.
-
setRequired
void setRequired(boolean required)
Sets if the slash command option is required.- Parameters:
required- Whether the option is required.
-
setAutocompletable
void setAutocompletable(boolean autocompletable)
Sets if this option can be autocompleted.- Parameters:
autocompletable- Whether the option can be autocompleted.
-
addChoice
void addChoice(SlashCommandOptionChoice choice)
Adds a choice for the slash command option.- Parameters:
choice- The choice.
-
setChoices
void setChoices(java.util.List<SlashCommandOptionChoice> choices)
Sets the choices of the slash command option.- Parameters:
choices- The choices.
-
addOption
void addOption(SlashCommandOption option)
Adds a slash command option to the slash command option.- Parameters:
option- The option.
-
setOptions
void setOptions(java.util.List<SlashCommandOption> options)
Sets the slash commands for the slash command option.- Parameters:
options- The options.
-
addChannelType
void addChannelType(ChannelType channelType)
Add a channel type to the slash command option.- Parameters:
channelType- The channel type.
-
setChannelTypes
void setChannelTypes(java.util.Collection<ChannelType> channelTypes)
Sets the channel types for the slash command option.- Parameters:
channelTypes- The channel types.
-
setLongMinValue
void setLongMinValue(long longMinValue)
Sets theSlashCommandOptionType.LONGmin value for the slash command option.- Parameters:
longMinValue- The long min value.
-
setLongMaxValue
void setLongMaxValue(long longMaxValue)
Sets theSlashCommandOptionType.LONGmax value for the slash command option.- Parameters:
longMaxValue- The long max value.
-
setDecimalMinValue
void setDecimalMinValue(double decimalMinValue)
Sets theSlashCommandOptionType.DECIMALmin value for the slash command option.- Parameters:
decimalMinValue- The decimal min value.
-
setDecimalMaxValue
void setDecimalMaxValue(double decimalMaxValue)
Sets theSlashCommandOptionType.DECIMALmax value for the slash command option.- Parameters:
decimalMaxValue- The decimal max value.
-
setMinLength
void setMinLength(long minLength)
Sets theSlashCommandOptionType.STRINGmin length for the slash command option.- Parameters:
minLength- The min length.
-
setMaxLength
void setMaxLength(long maxLength)
Sets theSlashCommandOptionType.STRINGmax length for the slash command option.- Parameters:
maxLength- The max length.
-
build
SlashCommandOption build()
Build the slash command option.- Returns:
- The built option.
-
-