Class UnknownComponentImpl
java.lang.Object
net.dv8tion.jda.internal.components.AbstractComponentImpl
net.dv8tion.jda.internal.components.UnknownComponentImpl
- All Implemented Interfaces:
ActionRowChildComponent
,ActionRowChildComponentUnion
,Component
,ContainerChildComponent
,ContainerChildComponentUnion
,IComponentUnion
,MessageTopLevelComponent
,MessageTopLevelComponentUnion
,SectionAccessoryComponent
,SectionAccessoryComponentUnion
,SectionContentComponent
,SectionContentComponentUnion
,UnknownComponent
,ModalTopLevelComponent
,ModalTopLevelComponentUnion
,SerializableData
public class UnknownComponentImpl
extends AbstractComponentImpl
implements UnknownComponent, MessageTopLevelComponentUnion, ModalTopLevelComponentUnion, ActionRowChildComponentUnion, SectionContentComponentUnion, SectionAccessoryComponentUnion, ContainerChildComponentUnion
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.Component
Component.Type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The unique, numeric identifier of this component.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.AbstractComponentImpl
asActionRow, asButton, asContainer, asEntitySelectMenu, asFileDisplay, asMediaGallery, asSection, asSeparator, asStringSelectMenu, asTextDisplay, asTextInput, asThumbnail
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.components.actionrow.ActionRowChildComponentUnion
asButton, asEntitySelectMenu, asStringSelectMenu
Methods inherited from interface net.dv8tion.jda.api.components.Component
isMessageCompatible, isModalCompatible
Methods inherited from interface net.dv8tion.jda.api.components.container.ContainerChildComponentUnion
asActionRow, asFileDisplay, asMediaGallery, asSection, asSeparator, asTextDisplay
Methods inherited from interface net.dv8tion.jda.api.components.IComponentUnion
isUnknownComponent
Methods inherited from interface net.dv8tion.jda.api.components.MessageTopLevelComponentUnion
asActionRow, asContainer, asFileDisplay, asMediaGallery, asSection, asSeparator, asTextDisplay
Methods inherited from interface net.dv8tion.jda.api.interactions.modals.ModalTopLevelComponentUnion
asActionRow
Methods inherited from interface net.dv8tion.jda.api.components.section.SectionAccessoryComponentUnion
asButton, asThumbnail
Methods inherited from interface net.dv8tion.jda.api.components.section.SectionContentComponentUnion
asTextDisplay
Methods inherited from interface net.dv8tion.jda.api.components.UnknownComponent
getType
-
Constructor Details
-
UnknownComponentImpl
-
-
Method Details
-
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 interfaceActionRowChildComponent
- Specified by:
withUniqueId
in interfaceActionRowChildComponentUnion
- Specified by:
withUniqueId
in interfaceComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponentUnion
- Specified by:
withUniqueId
in interfaceIComponentUnion
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponent
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponentUnion
- Specified by:
withUniqueId
in interfaceModalTopLevelComponent
- Specified by:
withUniqueId
in interfaceModalTopLevelComponentUnion
- Specified by:
withUniqueId
in interfaceSectionAccessoryComponent
- Specified by:
withUniqueId
in interfaceSectionAccessoryComponentUnion
- Specified by:
withUniqueId
in interfaceSectionContentComponent
- Specified by:
withUniqueId
in interfaceSectionContentComponentUnion
- Specified by:
withUniqueId
in interfaceUnknownComponent
- Parameters:
uniqueId
- The new ID; must be higher or equal to 1- Returns:
- The new component
-
getUniqueId
public int getUniqueId()Description copied from interface:Component
The unique, numeric identifier of this component.
Can be set manually or automatically assigned by Discord (starting from1
). If it has not been assigned yet, this will return-1
.Note: Older messages may return
0
.- Specified by:
getUniqueId
in interfaceComponent
- Returns:
- The unique identifier of this component, or
-1
if not assigned yet, or0
on older messages
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Returns:
DataObject
-