Interface ForumChannelManager
- All Superinterfaces:
AuditableRestAction<Void>
,ChannelManager<ForumChannel,
,ForumChannelManager> IAgeRestrictedChannelManager<ForumChannel,
,ForumChannelManager> ICategorizableChannelManager<ForumChannel,
,ForumChannelManager> IPermissionContainerManager<ForumChannel,
,ForumChannelManager> IPositionableChannelManager<ForumChannel,
,ForumChannelManager> ISlowmodeChannelManager<ForumChannel,
,ForumChannelManager> Manager<ForumChannelManager>
,RestAction<Void>
,StandardGuildChannelManager<ForumChannel,
ForumChannelManager>
public interface ForumChannelManager
extends StandardGuildChannelManager<ForumChannel,ForumChannelManager>, IAgeRestrictedChannelManager<ForumChannel,ForumChannelManager>, ISlowmodeChannelManager<ForumChannel,ForumChannelManager>
Manager providing functionality to modify a
ForumChannel
.
Example
manager.setName("gamer-forum")
.setSlowmode(10)
.setTopic("Welcome to the gamer forum!")
.queue();
manager.reset(ChannelManager.NSFW | ChannelManager.NAME)
.setName("gamer-forum-nsfw")
.setNSFW(true)
.queue();
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
Fields inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
APPLIED_TAGS, ARCHIVED, AUTO_ARCHIVE_DURATION, AVAILABLE_TAGS, BITRATE, DEFAULT_LAYOUT, DEFAULT_REACTION, INVITEABLE, LOCKED, NAME, NSFW, PARENT, PERMISSION, PINNED, POSITION, REGION, REQUIRE_TAG, SLOWMODE, TOPIC, TYPE, USERLIMIT
-
Method Summary
Modifier and TypeMethodDescriptionsetAvailableTags
(List<? extends BaseForumTag> tags) Sets the available tags of the selectedForumChannel
.setDefaultLayout
(ForumChannel.Layout layout) Sets the default layout of the selectedForumChannel
.setDefaultReaction
(Emoji emoji) Sets the default reaction emoji of the selectedForumChannel
.setTagRequired
(boolean requireTag) Sets the tag requirement state of thisForumChannel
.Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
getChannel, getGuild, reset, reset, setName
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IAgeRestrictedChannelManager
setNSFW
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.ICategorizableChannelManager
setParent, sync, sync
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverride
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPositionableChannelManager
setPosition
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.ISlowmodeChannelManager
setSlowmode
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Method Details
-
setTagRequired
Sets the tag requirement state of thisForumChannel
.
If true, all new posts must have at least one tag.- Parameters:
requireTag
- The new tag requirement state for the selectedForumChannel
- Returns:
- ChannelManager for chaining convenience.
- See Also:
-
setAvailableTags
@Nonnull @CheckReturnValue ForumChannelManager setAvailableTags(@Nonnull List<? extends BaseForumTag> tags) Sets the available tags of the selectedForumChannel
.
Tags will be ordered based on the provided list order.This is a full replacement of the tags list, all missing tags will be removed. You can use
ForumTagData
to create new tags or update existing ones.Example
List<BaseForumTag> tags = new ArrayList<>(channel.getAvailableTags()); tags.add(new ForumTagData("question").setModerated(true)); // add a new tag tags.set(0, ForumTagData.from(tags.get(0)).setName("bug report")); // update an existing tag // Update the tag list channel.getManager().setAvailableTags(tags).queue();
- Parameters:
tags
- The new available tags in the desired order.- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided list is null or contains null elements- See Also:
-
setDefaultReaction
Sets the default reaction emoji of the selectedForumChannel
.
This does not support custom emoji from other guilds.- Parameters:
emoji
- The new default reaction emoji, or null to unset.- Returns:
- ChannelManager for chaining convenience
- See Also:
-
setDefaultLayout
@Nonnull @CheckReturnValue ForumChannelManager setDefaultLayout(@Nonnull ForumChannel.Layout layout) Sets the default layout of the selectedForumChannel
.- Parameters:
layout
- The new default layout.- Returns:
- ChannelManager for chaining convenience
- See Also:
-