Interface MessageComponentTree
- All Superinterfaces:
ComponentTree<MessageTopLevelComponentUnion>
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 MessageComponentTreeDisables all components which can be disabled, and constructs a new tree from the result.default MessageComponentTreeEnables all components which can be enabled, and constructs a new tree from the result.static MessageComponentTreeof(Collection<? extends MessageTopLevelComponent> components) Creates aMessageComponentTreefrom the given top-level message components.static MessageComponentTreeof(MessageTopLevelComponent... components) Creates aMessageComponentTreefrom 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:ComponentTreeReplaces and/or removes components using the providedComponentReplacer, and construct a new tree from the result.- Specified by:
replacein interfaceComponentTree<MessageTopLevelComponentUnion>- Parameters:
replacer- TheComponentReplacerto apply- Returns:
- A new tree with the new components
- See Also:
-
withDisabled
Description copied from interface:ComponentTreeEnables or disables all components which can be enabled/disabled, and constructs a new tree from the result.- Specified by:
withDisabledin interfaceComponentTree<MessageTopLevelComponentUnion>- Returns:
- A new tree with all components enabled/disabled.
-
asDisabled
Description copied from interface:ComponentTreeDisables all components which can be disabled, and constructs a new tree from the result.- Specified by:
asDisabledin interfaceComponentTree<MessageTopLevelComponentUnion>- Returns:
- A new tree with all components disabled.
-
asEnabled
Description copied from interface:ComponentTreeEnables all components which can be enabled, and constructs a new tree from the result.- Specified by:
asEnabledin interfaceComponentTree<MessageTopLevelComponentUnion>- Returns:
- A new tree with all components enabled.
-
of
@Nonnull static MessageComponentTree of(@Nonnull Collection<? extends MessageTopLevelComponent> components) Creates aMessageComponentTreefrom the given top-level message components.- Parameters:
components- List of components to construct the tree from- Returns:
- A
MessageComponentTreecontaining the given components - Throws:
IllegalArgumentException- Ifnullis provided
-
of
Creates aMessageComponentTreefrom the given top-level message components.- Parameters:
components- List of components to construct the tree from- Returns:
- A
MessageComponentTreecontaining the given components - Throws:
IllegalArgumentException- Ifnullis provided
-