Package net.dv8tion.jda.api.components
Interface IComponentUnion
- All Superinterfaces:
Component
- All Known Subinterfaces:
ActionRowChildComponentUnion,ContainerChildComponentUnion,LabelChildComponentUnion,MessageTopLevelComponentUnion,ModalTopLevelComponentUnion,SectionAccessoryComponentUnion,SectionContentComponentUnion
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 booleanWhether 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
UnknownComponentfor details.This is equivalent to
getType() == Type.UNKNOWN.- Returns:
trueif this is an unknown component,falseif not.- See Also:
-
withUniqueId
Description copied from interface:ComponentCreates 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:
withUniqueIdin interfaceComponent- Parameters:
uniqueId- The new ID; must be higher or equal to 1- Returns:
- The new component
-