Class SelectMenuBuilder
- java.lang.Object
-
- org.javacord.api.entity.message.component.SelectMenuBuilder
-
- All Implemented Interfaces:
ComponentBuilder,LowLevelComponentBuilder
public class SelectMenuBuilder extends java.lang.Object implements LowLevelComponentBuilder
-
-
Constructor Summary
Constructors Constructor Description SelectMenuBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectMenuBuilderaddOption(SelectMenuOption selectMenuOption)Add an option to the select menu.SelectMenuBuilderaddOptions(java.util.List<SelectMenuOption> selectMenuOptions)Adds all given options to the select menu.SelectMenubuild()Creates aSelectMenuinstance with the given values.SelectMenuBuildercopy(SelectMenu selectMenu)Create a copy of an existing select menu.SelectMenuBuilderDelegategetDelegate()Get the builder delegate.ComponentTypegetType()Get the type of component being built.SelectMenuBuilderremoveAllOptions()Removes all options from the select menu.SelectMenuBuilderremoveOption(SelectMenuOption selectMenuOption)Remove an option from the select menu.SelectMenuBuildersetCustomId(java.lang.String customId)Set the custom ID for the select menu.SelectMenuBuildersetDisabled(boolean isDisabled)Set if the select menu should be disabled.SelectMenuBuildersetMaximumValues(int maximumValues)Set the maximum amount of options which can be selected.SelectMenuBuildersetMinimumValues(int minimumValues)Set the minimum amount of options which must be selected.SelectMenuBuildersetPlaceholder(java.lang.String placeholder)Set the placeholder for the select menu.
-
-
-
Method Detail
-
getType
public ComponentType getType()
Description copied from interface:ComponentBuilderGet the type of component being built.- Specified by:
getTypein interfaceComponentBuilder- Returns:
- The type of component being built.
-
getDelegate
public SelectMenuBuilderDelegate getDelegate()
Description copied from interface:ComponentBuilderGet the builder delegate.- Specified by:
getDelegatein interfaceComponentBuilder- Returns:
- The builder delegate.
-
setPlaceholder
public SelectMenuBuilder setPlaceholder(java.lang.String placeholder)
Set the placeholder for the select menu.- Parameters:
placeholder- The placeholder.- Returns:
- The builder.
-
setMinimumValues
public SelectMenuBuilder setMinimumValues(int minimumValues)
Set the minimum amount of options which must be selected.- Parameters:
minimumValues- The minimum values.- Returns:
- The builder.
-
setMaximumValues
public SelectMenuBuilder setMaximumValues(int maximumValues)
Set the maximum amount of options which can be selected.- Parameters:
maximumValues- The maximum values.- Returns:
- The builder.
-
setCustomId
public SelectMenuBuilder setCustomId(java.lang.String customId)
Set the custom ID for the select menu.- Parameters:
customId- The custom ID.- Returns:
- The builder.
-
addOption
public SelectMenuBuilder addOption(SelectMenuOption selectMenuOption)
Add an option to the select menu.- Parameters:
selectMenuOption- The option.- Returns:
- The builder.
-
removeOption
public SelectMenuBuilder removeOption(SelectMenuOption selectMenuOption)
Remove an option from the select menu.- Parameters:
selectMenuOption- The option.- Returns:
- The builder.
-
addOptions
public SelectMenuBuilder addOptions(java.util.List<SelectMenuOption> selectMenuOptions)
Adds all given options to the select menu.- Parameters:
selectMenuOptions- The options.- Returns:
- The builder.
-
removeAllOptions
public SelectMenuBuilder removeAllOptions()
Removes all options from the select menu.- Returns:
- The builder.
-
setDisabled
public SelectMenuBuilder setDisabled(boolean isDisabled)
Set if the select menu should be disabled.- Parameters:
isDisabled- Is disabled.- Returns:
- The builder.
-
copy
public SelectMenuBuilder copy(SelectMenu selectMenu)
Create a copy of an existing select menu.- Parameters:
selectMenu- The select menu to copy.- Returns:
- The select menu builder.
-
build
public SelectMenu build()
Creates aSelectMenuinstance with the given values.- Returns:
- The created select menu instance.
-
-