Interface IThreadContainerMixin<T extends IThreadContainerMixin<T>>
- All Superinterfaces:
Channel
,ChannelMixin<T>
,ChannelUnion
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,GuildChannelMixin<T>
,GuildChannelUnion
,IDetachableEntity
,IDetachableEntityMixin
,IMentionable
,IPermissionContainer
,ISnowflake
,IThreadContainer
,IThreadContainerUnion
- All Known Subinterfaces:
ForumChannelMixin<T>
,IPostContainerMixin<T>
,MediaChannelMixin<T>
,NewsChannelMixin<T>
,StandardGuildMessageChannelMixin<T>
,TextChannelMixin<T>
- All Known Implementing Classes:
AbstractStandardGuildMessageChannelImpl
,DetachedForumChannelImpl
,DetachedMediaChannelImpl
,DetachedNewsChannelImpl
,DetachedTextChannelImpl
,ForumChannelImpl
,MediaChannelImpl
,NewsChannelImpl
,TextChannelImpl
public interface IThreadContainerMixin<T extends IThreadContainerMixin<T>>
extends IThreadContainer, IThreadContainerUnion, GuildChannelMixin<T>
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTH
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
-
Method Summary
Modifier and TypeMethodDescriptiondefault ThreadChannelAction
createThreadChannel
(String name, boolean isPrivate) Creates a newThreadChannel
with the parent channel being thisIThreadContainer
.default ThreadChannelAction
createThreadChannel
(String name, long messageId) Creates a new, publicThreadChannel
with the parent channel being thisIThreadContainer
.default ThreadChannelPaginationAction
Retrieves the archived privateThreadChannels
for this channel, that the bot has previously joined or been added to.default ThreadChannelPaginationAction
Retrieves the archived privateThreadChannels
for this channel.default ThreadChannelPaginationAction
Retrieves the archived publicThreadChannels
for this channel.setDefaultThreadSlowmode
(int slowmode) Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getType
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.ChannelMixin
setName
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.ChannelUnion
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
getGuild, getJumpUrl, getPermissionContainer
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildChannelMixin
checkCanAccess, checkCanManage, checkPermission, checkPermission, delete, hasPermission
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.GuildChannelUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetached
Methods inherited from interface net.dv8tion.jda.internal.entities.detached.mixin.IDetachableEntityMixin
checkAttached, detachedException, detachedRequiresChannelException
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getManager, getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverride
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer
createThreadChannel, createThreadChannel, getDefaultThreadSlowmode, getThreadChannels
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IThreadContainerUnion
asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel
-
Method Details
-
createThreadChannel
Description copied from interface:IThreadContainer
Creates a newThreadChannel
with the parent channel being thisIThreadContainer
.The resulting
ThreadChannel
may be one of:Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMAX_CHANNELS
The maximum number of channels were exceededErrorResponse.MAX_ACTIVE_THREADS
The maximum number of active threads has been reached, and no more may be created.ErrorResponse.MISSING_PERMISSIONS
Due to missing private thread permissions.
- Specified by:
createThreadChannel
in interfaceIThreadContainer
- Parameters:
name
- The name of the new ThreadChannel (up to 100 characters).isPrivate
- The public/private status of the new ThreadChannel. If true, the new ThreadChannel will be private.- Returns:
- A specific
ThreadChannelAction
that may be used to configure the new ThreadChannel before its creation.
-
createThreadChannel
Description copied from interface:IThreadContainer
Creates a new, publicThreadChannel
with the parent channel being thisIThreadContainer
.
The starting message will copy the message for the provided id, and will be of typeMessageType.THREAD_STARTER_MESSAGE
.The resulting
ThreadChannel
may be one of:Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMAX_CHANNELS
The maximum number of channels were exceededErrorResponse.THREAD_WITH_THIS_MESSAGE_ALREADY_EXISTS
This message has already been used to create a threadErrorResponse.MAX_ACTIVE_THREADS
The maximum number of active threads has been reached, and no more may be created.
- Specified by:
createThreadChannel
in interfaceIThreadContainer
- Parameters:
name
- The name of the new ThreadChannel (up to 100 characters)messageId
- The ID of the message from which this ThreadChannel will be spawned.- Returns:
- A specific
ThreadChannelAction
that may be used to configure the new ThreadChannel before its creation.
-
retrieveArchivedPublicThreadChannels
Description copied from interface:IThreadContainer
Retrieves the archived publicThreadChannels
for this channel.
This will iterate over all previously opened public threads, that have been archived.You can use
IThreadContainer.retrieveArchivedPrivateThreadChannels()
, to get all private archived threads.These threads can also represent posts in
ForumChannels
.- Specified by:
retrieveArchivedPublicThreadChannels
in interfaceIThreadContainer
- Returns:
ThreadChannelPaginationAction
to iterate over all public archived ThreadChannels
-
retrieveArchivedPrivateThreadChannels
Description copied from interface:IThreadContainer
Retrieves the archived privateThreadChannels
for this channel.
This will iterate over all previously opened private threads, that have been archived. This is a moderator restricted method, since private threads are only visible to members withPermission.MANAGE_THREADS
.You can use
IThreadContainer.retrieveArchivedPublicThreadChannels()
, to get all public archived threads.Note that
ForumChannels
cannot have private threads.- Specified by:
retrieveArchivedPrivateThreadChannels
in interfaceIThreadContainer
- Returns:
ThreadChannelPaginationAction
to iterate over all private archived ThreadChannels
-
retrieveArchivedPrivateJoinedThreadChannels
Description copied from interface:IThreadContainer
Retrieves the archived privateThreadChannels
for this channel, that the bot has previously joined or been added to.
UnlikeIThreadContainer.retrieveArchivedPrivateThreadChannels()
, this only checks for threads which the bot has joined, and thus does not require permissions to manage threads.You can use
IThreadContainer.retrieveArchivedPrivateThreadChannels()
, to get all private archived threads.Note that
ForumChannels
cannot have private threads.- Specified by:
retrieveArchivedPrivateJoinedThreadChannels
in interfaceIThreadContainer
- Returns:
ThreadChannelPaginationAction
to iterate over all joined private archived ThreadChannels
-
setDefaultThreadSlowmode
-