Record Class EntitySelectMenuDefinition
java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.definitions.interactions.component.menu.EntitySelectMenuDefinition
- Record Components:
clazzDescription
- theClassDescription
of the declaring class of themethodDescription()
methodDescription
- theMethodDescription
of the method this definition is bound topermissions
- aCollection
of permissions for this menuselectTargets
- theEntitySelectMenu.SelectTarget
s of this menudefaultValues
- theEntitySelectMenu.DefaultValue
s of this menuchannelTypes
- theChannelType
s that should be supported by this menu.placeholder
- the placeholder text of this menuminValue
- the minimum amount of choicesmaxValue
- the maximum amount of choices
- All Implemented Interfaces:
Definition
,CustomIdJDAEntity<EntitySelectMenu>
,com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
,JDAEntity<EntitySelectMenu>
,ComponentDefinition<EntitySelectMenu>
,SelectMenuDefinition<EntitySelectMenu>
,InteractionDefinition
public record EntitySelectMenuDefinition(@NotNull ClassDescription clazzDescription, @NotNull MethodDescription methodDescription, @NotNull Collection<String> permissions, @NotNull Set<EntitySelectMenu.SelectTarget> selectTargets, @NotNull Set<EntitySelectMenu.DefaultValue> defaultValues, @NotNull Set<ChannelType> channelTypes, @NotNull String placeholder, int minValue, int maxValue)
extends Record
implements SelectMenuDefinition<EntitySelectMenu>
Representation of an entity select menu.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.kaktushose.jda.commands.definitions.interactions.InteractionDefinition
InteractionDefinition.ReplyConfig
-
Field Summary
Fields inherited from interface com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
log
-
Constructor Summary
ConstructorDescriptionEntitySelectMenuDefinition
(@NotNull ClassDescription clazzDescription, @NotNull MethodDescription methodDescription, @NotNull Collection<String> permissions, @NotNull Set<EntitySelectMenu.SelectTarget> selectTargets, @NotNull Set<EntitySelectMenu.DefaultValue> defaultValues, @NotNull Set<ChannelType> channelTypes, @NotNull String placeholder, int minValue, int maxValue) Creates an instance of aEntitySelectMenuDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<EntitySelectMenuDefinition> build
(MethodBuildContext context) Builds a newEntitySelectMenuDefinition
from the givenMethodBuildContext
.@NotNull Set
<ChannelType> Returns the value of thechannelTypes
record component.@NotNull ClassDescription
Returns the value of theclazzDescription
record component.@NotNull Set
<EntitySelectMenu.DefaultValue> Returns the value of thedefaultValues
record component.@NotNull String
The human-readable name of this definition.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
maxValue()
Returns the value of themaxValue
record component.@NotNull MethodDescription
Returns the value of themethodDescription
record component.int
minValue()
Returns the value of theminValue
record component.@NotNull Collection
<String> Returns the value of thepermissions
record component.@NotNull String
Returns the value of theplaceholder
record component.@NotNull Set
<EntitySelectMenu.SelectTarget> Returns the value of theselectTargets
record component.@NotNull EntitySelectMenu
Transforms this definition to anEntitySelectMenu
with an independent custom id.@NotNull EntitySelectMenu
toJDAEntity
(@NotNull CustomId customId) Transforms this definition to anEntitySelectMenu
with the givenCustomId
.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.interactions.InteractionDefinition
definitionId, newInstance, replyConfig
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
invoke
-
Constructor Details
-
EntitySelectMenuDefinition
public EntitySelectMenuDefinition(@NotNull @NotNull ClassDescription clazzDescription, @NotNull @NotNull MethodDescription methodDescription, @NotNull @NotNull Collection<String> permissions, @NotNull @NotNull Set<EntitySelectMenu.SelectTarget> selectTargets, @NotNull @NotNull Set<EntitySelectMenu.DefaultValue> defaultValues, @NotNull @NotNull Set<ChannelType> channelTypes, @NotNull @NotNull String placeholder, int minValue, int maxValue) Creates an instance of aEntitySelectMenuDefinition
record class.- Parameters:
clazzDescription
- the value for theclazzDescription
record componentmethodDescription
- the value for themethodDescription
record componentpermissions
- the value for thepermissions
record componentselectTargets
- the value for theselectTargets
record componentdefaultValues
- the value for thedefaultValues
record componentchannelTypes
- the value for thechannelTypes
record componentplaceholder
- the value for theplaceholder
record componentminValue
- the value for theminValue
record componentmaxValue
- the value for themaxValue
record component
-
-
Method Details
-
build
Builds a newEntitySelectMenuDefinition
from the givenMethodBuildContext
.- Returns:
- an
Optional
holding theEntitySelectMenuDefinition
-
toJDAEntity
Transforms this definition to anEntitySelectMenu
with an independent custom id.- Specified by:
toJDAEntity
in interfaceJDAEntity<EntitySelectMenu>
- Returns:
- the
EntitySelectMenu
- See Also:
-
toJDAEntity
Transforms this definition to anEntitySelectMenu
with the givenCustomId
.- Specified by:
toJDAEntity
in interfaceCustomIdJDAEntity<EntitySelectMenu>
- Parameters:
customId
- theCustomId
to use- Returns:
- the
EntitySelectMenu
-
displayName
Description copied from interface:Definition
The human-readable name of this definition.- Specified by:
displayName
in interfaceDefinition
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
clazzDescription
Returns the value of theclazzDescription
record component.- Specified by:
clazzDescription
in interfaceComponentDefinition<EntitySelectMenu>
- Specified by:
clazzDescription
in interfacecom.github.kaktushose.jda.commands.definitions.features.internal.Invokable
- Returns:
- the value of the
clazzDescription
record component
-
methodDescription
Returns the value of themethodDescription
record component.- Specified by:
methodDescription
in interfaceComponentDefinition<EntitySelectMenu>
- Specified by:
methodDescription
in interfacecom.github.kaktushose.jda.commands.definitions.features.internal.Invokable
- Returns:
- the value of the
methodDescription
record component
-
permissions
Returns the value of thepermissions
record component.- Specified by:
permissions
in interfaceInteractionDefinition
- Returns:
- the value of the
permissions
record component
-
selectTargets
Returns the value of theselectTargets
record component.- Returns:
- the value of the
selectTargets
record component
-
defaultValues
Returns the value of thedefaultValues
record component.- Returns:
- the value of the
defaultValues
record component
-
channelTypes
Returns the value of thechannelTypes
record component.- Returns:
- the value of the
channelTypes
record component
-
placeholder
Returns the value of theplaceholder
record component.- Specified by:
placeholder
in interfaceSelectMenuDefinition<EntitySelectMenu>
- Returns:
- the value of the
placeholder
record component
-
minValue
public int minValue()Returns the value of theminValue
record component.- Specified by:
minValue
in interfaceSelectMenuDefinition<EntitySelectMenu>
- Returns:
- the value of the
minValue
record component
-
maxValue
public int maxValue()Returns the value of themaxValue
record component.- Specified by:
maxValue
in interfaceSelectMenuDefinition<EntitySelectMenu>
- Returns:
- the value of the
maxValue
record component
-