Interface MessageComponentTree
- All Superinterfaces:
ComponentTree<MessageTopLevelComponentUnion>
- All Known Implementing Classes:
MessageComponentTreeImpl
Specialization of
ComponentTree
for top-level message components
.
Use the static methods to construct a MessageComponentTree
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.tree.ComponentTree
ComponentTree.Type
-
Method Summary
Modifier and TypeMethodDescriptiondefault MessageComponentTree
Disables all components which can be disabled, and constructs a new tree from the result.default MessageComponentTree
Enables all components which can be enabled, and constructs a new tree from the result.static MessageComponentTree
of
(Collection<? extends MessageTopLevelComponent> components) Creates aMessageComponentTree
from the given top-level message components.static MessageComponentTree
of
(MessageTopLevelComponent... components) Creates aMessageComponentTree
from the given top-level message components.replace
(ComponentReplacer replacer) Replaces and/or removes components using the providedComponentReplacer
, and construct a new tree from the result.withDisabled
(boolean disabled) Enables or disables all components which can be enabled/disabled, and constructs a new tree from the result.Methods inherited from interface net.dv8tion.jda.api.components.tree.ComponentTree
find, findAll, findAll, getComponents, getType
-
Method Details
-
replace
Description copied from interface:ComponentTree
Replaces and/or removes components using the providedComponentReplacer
, and construct a new tree from the result.- Specified by:
replace
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Parameters:
replacer
- TheComponentReplacer
to apply- Returns:
- A new tree with the new components
- See Also:
-
withDisabled
Description copied from interface:ComponentTree
Enables or disables all components which can be enabled/disabled, and constructs a new tree from the result.- Specified by:
withDisabled
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Returns:
- A new tree with all components enabled/disabled.
-
asDisabled
Description copied from interface:ComponentTree
Disables all components which can be disabled, and constructs a new tree from the result.- Specified by:
asDisabled
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Returns:
- A new tree with all components disabled.
-
asEnabled
Description copied from interface:ComponentTree
Enables all components which can be enabled, and constructs a new tree from the result.- Specified by:
asEnabled
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Returns:
- A new tree with all components enabled.
-
of
@Nonnull static MessageComponentTree of(@Nonnull Collection<? extends MessageTopLevelComponent> components) Creates aMessageComponentTree
from the given top-level message components.- Parameters:
components
- List of components to construct the tree from- Returns:
- A
MessageComponentTree
containing the given components - Throws:
IllegalArgumentException
- Ifnull
is provided
-
of
Creates aMessageComponentTree
from the given top-level message components.- Parameters:
components
- List of components to construct the tree from- Returns:
- A
MessageComponentTree
containing the given components - Throws:
IllegalArgumentException
- Ifnull
is provided
-