Interface ThreadChannelManager
- All Superinterfaces:
AuditableRestAction<Void>
,ChannelManager<ThreadChannel,
,ThreadChannelManager> ISlowmodeChannelManager<ThreadChannel,
,ThreadChannelManager> Manager<ThreadChannelManager>
,RestAction<Void>
public interface ThreadChannelManager
extends ChannelManager<ThreadChannel,ThreadChannelManager>, ISlowmodeChannelManager<ThreadChannel,ThreadChannelManager>
Manager providing functionality common for all
ThreadChannels
.
Example
manager.setSlowmode(10)
.setArchived(false)
.queue();
manager.reset(ChannelManager.SLOWMODE | ChannelManager.NAME)
.setName("Java is to Javascript as car is to carpet")
.setLocked(false)
.setSlowmode(120)
.queue();
- See Also:
-
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 TypeMethodDescriptionsetAppliedTags
(Collection<? extends ForumTagSnowflake> tags) Sets the appliedForumTags
for this forum post thread.default ThreadChannelManager
setAppliedTags
(ForumTagSnowflake... tags) Sets the appliedForumTags
for this forum post thread.setArchived
(boolean archived) Sets the archived state of this ThreadChannel.setAutoArchiveDuration
(ThreadChannel.AutoArchiveDuration autoArchiveDuration) Sets the inactive time before autoarchiving of this ThreadChannel.setInvitable
(boolean invitable) Sets the invitable state of this ThreadChannel.setLocked
(boolean locked) Sets the locked state of this ThreadChannel.setPinned
(boolean pinned) Sets the pinned state of this ThreadChannel.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.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
-
setAutoArchiveDuration
@Nonnull @CheckReturnValue ThreadChannelManager setAutoArchiveDuration(@Nonnull ThreadChannel.AutoArchiveDuration autoArchiveDuration) Sets the inactive time before autoarchiving of this ThreadChannel.This is limited to the choices offered in
ThreadChannel.AutoArchiveDuration
- Parameters:
autoArchiveDuration
- The new duration before an inactive channel will be autoarchived.- Returns:
- this ThreadChannelManager for chaining convenience.
- See Also:
-
setArchived
Sets the archived state of this ThreadChannel.- Parameters:
archived
- The new archived state for the selectedThreadChannel
- Returns:
- this ThreadChannelManager for chaining convenience
- Throws:
InsufficientPermissionException
- If the currently logged in account is not the thread owner or does not have theMANAGE_THREADS
permission. Or if the thread is locked (archived by a moderator) and the current account does not have theMANAGE_THREADS
permission.- See Also:
-
setLocked
Sets the locked state of this ThreadChannel.This is the equivalent of archiving as a moderator.
- Parameters:
locked
- The new locked state for the selectedThreadChannel
- Returns:
- this ThreadChannelManager for chaining convenience.
- Throws:
InsufficientPermissionException
- If the currently logged in account is not the thread owner or does not have theMANAGE_THREADS
permission.- See Also:
-
setInvitable
Sets the invitable state of this ThreadChannel.This property can only be set on private ThreadChannels.
- Parameters:
invitable
- The new invitable state for the selectedThreadChannel
- Returns:
- this ThreadChannelManager for chaining convenience.
- Throws:
IllegalStateException
- If the selectedThreadChannel
is not a private ThreadChannelInsufficientPermissionException
- If the currently logged in account is not the thread owner or does not have theMANAGE_THREADS
permission.- See Also:
-
setPinned
Sets the pinned state of this ThreadChannel.This property can only be set on forum post threads.
- Parameters:
pinned
- The new pinned state for the selectedThreadChannel
- Returns:
- this ThreadChannelManager for chaining convenience.
- Throws:
IllegalStateException
- If the selectedThreadChannel
is not a forum post threadInsufficientPermissionException
- If the currently logged in account is not the thread owner or does not have theMANAGE_THREADS
permission.- See Also:
-
setAppliedTags
@Nonnull @CheckReturnValue ThreadChannelManager setAppliedTags(@Nonnull Collection<? extends ForumTagSnowflake> tags) Sets the appliedForumTags
for this forum post thread.
This is only applicable to public threads inside forum channels. The tags must be from the forum channel. You can get the list of available tags withIPostContainer.getAvailableTags()
.- Parameters:
tags
- The new tags for the thread- Returns:
- this ThreadChannelManager for chaining convenience.
- Throws:
IllegalStateException
- If the thread is not a forum postIllegalArgumentException
-
-
setAppliedTags
@Nonnull @CheckReturnValue default ThreadChannelManager setAppliedTags(@Nonnull ForumTagSnowflake... tags) Sets the appliedForumTags
for this forum post thread.
This is only applicable to public threads inside forum channels. The tags must be from the forum channel. You can get the list of available tags withIPostContainer.getAvailableTags()
.- Parameters:
tags
- The new tags for the thread- Returns:
- this ThreadChannelManager for chaining convenience.
- Throws:
IllegalStateException
- If the thread is not a forum postIllegalArgumentException
-
-