Package net.dv8tion.jda.api.components
Interface IComponentUnion
- All Superinterfaces:
Component
- All Known Subinterfaces:
ActionRowChildComponentUnion
,ContainerChildComponentUnion
,MessageTopLevelComponentUnion
,ModalTopLevelComponentUnion
,SectionAccessoryComponentUnion
,SectionContentComponentUnion
- All Known Implementing Classes:
ActionRowImpl
,ButtonImpl
,ContainerImpl
,EntitySelectMenuImpl
,FileDisplayFileUpload
,FileDisplayImpl
,MediaGalleryImpl
,SectionImpl
,SelectMenuImpl
,SeparatorImpl
,StringSelectMenuImpl
,TextDisplayImpl
,TextInputImpl
,ThumbnailFileUpload
,ThumbnailImpl
,UnknownComponentImpl
Base interface for
Component
union types.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.Component
Component.Type
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Whether this component is anUnknownComponent
.withUniqueId
(int uniqueId) Creates a new component with the provided numeric ID.Methods inherited from interface net.dv8tion.jda.api.components.Component
getType, getUniqueId, isMessageCompatible, isModalCompatible
-
Method Details
-
isUnknownComponent
default boolean isUnknownComponent()Whether this component is anUnknownComponent
.Unknown components have restrictions, see
UnknownComponent
for details.This is equivalent to
getType() == Type.UNKNOWN
.- Returns:
true
if this is an unknown component,false
if not.- See Also:
-
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 interfaceComponent
- Parameters:
uniqueId
- The new ID; must be higher or equal to 1- Returns:
- The new component
-