Class EntitySelectMenuImpl
java.lang.Object
net.dv8tion.jda.internal.components.AbstractComponentImpl
net.dv8tion.jda.internal.components.selections.SelectMenuImpl
net.dv8tion.jda.internal.components.selections.EntitySelectMenuImpl
- All Implemented Interfaces:
ActionComponent
,ActionRowChildComponent
,ActionRowChildComponentUnion
,IDisableable
,Component
,IComponentUnion
,EntitySelectMenu
,SelectMenu
,SerializableData
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.Component
Component.Type
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.selections.EntitySelectMenu
EntitySelectMenu.Builder, EntitySelectMenu.DefaultValue, EntitySelectMenu.SelectTarget
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.selections.SelectMenu
SelectMenu.Builder<T extends SelectMenu,
B extends SelectMenu.Builder<T, B>> -
Field Summary
Fields inherited from interface net.dv8tion.jda.api.components.selections.SelectMenu
ID_MAX_LENGTH, OPTIONS_MAX_AMOUNT, PLACEHOLDER_MAX_LENGTH
-
Constructor Summary
ConstructorsConstructorDescriptionEntitySelectMenuImpl
(String id, int uniqueId, String placeholder, int minValues, int maxValues, boolean disabled, Component.Type type, EnumSet<ChannelType> channelTypes, List<EntitySelectMenu.DefaultValue> defaultValues) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The allowedChannelTypes
for this menu.Default selected values.TheSelectTargets
supported by this menu.getType()
The type of component.int
hashCode()
toData()
SerializedDataObject
for this object.withUniqueId
(int uniqueId) Creates a new component with the provided numeric ID.Methods inherited from class net.dv8tion.jda.internal.components.selections.SelectMenuImpl
getCustomId, getMaxValues, getMinValues, getPlaceholder, getUniqueId, isDisabled, toString
Methods inherited from class net.dv8tion.jda.internal.components.AbstractComponentImpl
asActionRow, asButton, asContainer, asEntitySelectMenu, asFileDisplay, asMediaGallery, asSection, asSeparator, asStringSelectMenu, asTextDisplay, asTextInput, asThumbnail
Methods inherited from interface net.dv8tion.jda.api.components.ActionComponent
getId, isDisabled
Methods inherited from interface net.dv8tion.jda.api.components.actionrow.ActionRowChildComponentUnion
asButton, asEntitySelectMenu, asStringSelectMenu
Methods inherited from interface net.dv8tion.jda.api.components.Component
getUniqueId, isMessageCompatible, isModalCompatible
Methods inherited from interface net.dv8tion.jda.api.components.selections.EntitySelectMenu
asDisabled, asEnabled, createCopy, withDisabled
Methods inherited from interface net.dv8tion.jda.api.components.IComponentUnion
isUnknownComponent
Methods inherited from interface net.dv8tion.jda.api.components.attribute.IDisableable
isEnabled
Methods inherited from interface net.dv8tion.jda.api.components.selections.SelectMenu
getCustomId, getMaxValues, getMinValues, getPlaceholder
-
Constructor Details
-
EntitySelectMenuImpl
-
EntitySelectMenuImpl
public EntitySelectMenuImpl(String id, int uniqueId, String placeholder, int minValues, int maxValues, boolean disabled, Component.Type type, EnumSet<ChannelType> channelTypes, List<EntitySelectMenu.DefaultValue> defaultValues)
-
-
Method Details
-
getType
Description copied from interface:Component
The type of component.- Specified by:
getType
in interfaceComponent
- Returns:
Component.Type
-
withUniqueId
Description copied from interface:Component
Creates a new component with the provided numeric ID.
If no ID is set, Discord will generate IDs incrementally starting from 1 and will not use existing IDs from the same message/modal.- Specified by:
withUniqueId
in interfaceActionComponent
- Specified by:
withUniqueId
in interfaceActionRowChildComponent
- Specified by:
withUniqueId
in interfaceActionRowChildComponentUnion
- Specified by:
withUniqueId
in interfaceComponent
- Specified by:
withUniqueId
in interfaceEntitySelectMenu
- Specified by:
withUniqueId
in interfaceIComponentUnion
- Specified by:
withUniqueId
in interfaceIDisableable
- Specified by:
withUniqueId
in interfaceSelectMenu
- Specified by:
withUniqueId
in classSelectMenuImpl
- Parameters:
uniqueId
- The new ID; must be higher or equal to 1- Returns:
- The new component
-
getEntityTypes
Description copied from interface:EntitySelectMenu
TheSelectTargets
supported by this menu.
If the targets includeEntitySelectMenu.SelectTarget.CHANNEL
, then they are also filtered byEntitySelectMenu.getChannelTypes()
.Modifying the returned
EnumSet
will not affect this menu.- Specified by:
getEntityTypes
in interfaceEntitySelectMenu
- Returns:
EnumSet
ofEntitySelectMenu.SelectTarget
-
getChannelTypes
Description copied from interface:EntitySelectMenu
The allowedChannelTypes
for this menu.
This is only relevant if theSelectTargets
includeEntitySelectMenu.SelectTarget.CHANNEL
. The returned set is empty if all types are supported, orEntitySelectMenu.getEntityTypes()
does not includeEntitySelectMenu.SelectTarget.CHANNEL
.Modifying the returned
EnumSet
will not affect this menu.- Specified by:
getChannelTypes
in interfaceEntitySelectMenu
- Returns:
EnumSet
ofChannelType
-
getDefaultValues
Description copied from interface:EntitySelectMenu
Default selected values.
These are shown until the user customizes the selected values, which then fires aEntitySelectInteractionEvent
.- Specified by:
getDefaultValues
in interfaceEntitySelectMenu
- Returns:
- Immutable list of
default values
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Overrides:
toData
in classSelectMenuImpl
- Returns:
DataObject
-
hashCode
public int hashCode() -
equals
-