Interface IPostContainerManager<T extends IPostContainer,M extends IPostContainerManager<T,M>>
- Type Parameters:
T
- The channel typeM
- The manager type
- All Superinterfaces:
AuditableRestAction<Void>
,ChannelManager<T,
,M> IPermissionContainerManager<T,
,M> IThreadContainerManager<T,
,M> Manager<M>
,RestAction<Void>
- All Known Subinterfaces:
ForumChannelManager
,MediaChannelManager
public interface IPostContainerManager<T extends IPostContainer,M extends IPostContainerManager<T,M>>
extends IThreadContainerManager<T,M>, IPermissionContainerManager<T,M>
Manager abstraction to configure settings related to forum post containers, such as
ForumChannel
.-
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, DEFAULT_SORT_ORDER, DEFAULT_THREAD_SLOWMODE, HIDE_MEDIA_DOWNLOAD_OPTIONS, 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 selectedIPostContainer
.setDefaultReaction
(Emoji emoji) Sets the default reaction emoji of the selectedIPostContainer
.setDefaultSortOrder
(IPostContainer.SortOrder sortOrder) Sets the default sort order of the selectedIPostContainer
.setTagRequired
(boolean requireTag) Sets the tag requirement state of thisIPostContainer
.Sets the topic of the selectedchannel
.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.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverride
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IThreadContainerManager
setDefaultThreadSlowmode
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 thisIPostContainer
.
If true, all new posts must have at least one tag.- Parameters:
requireTag
- The new tag requirement state for the selectedIPostContainer
- Returns:
- ChannelManager for chaining convenience.
- See Also:
-
setAvailableTags
Sets the available tags of the selectedIPostContainer
.
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 selectedIPostContainer
.
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:
-
setDefaultSortOrder
Sets the default sort order of the selectedIPostContainer
.- Parameters:
sortOrder
- The newIPostContainer.SortOrder
- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- If null orIPostContainer.SortOrder.UNKNOWN
is provided- See Also:
-
setTopic
Sets the topic of the selectedchannel
.- Parameters:
topic
- The new topic for the selected channel,null
or empty String to reset- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided topic is greater than 4096 in length.
-