Package net.dv8tion.jda.api.entities
Interface IThreadContainer
- All Superinterfaces:
Channel,Comparable<GuildChannel>,Formattable,GuildChannel,IMentionable,IPermissionContainer,ISnowflake
- All Known Subinterfaces:
BaseGuildMessageChannel,NewsChannel,TextChannel
-
Method Summary
Modifier and TypeMethodDescriptiondefault ThreadChannelActioncreateThreadChannel(String name) Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer.createThreadChannel(String name, boolean isPrivate) Creates a newThreadChannelwith the parent channel being thisIThreadContainer.createThreadChannel(String name, long messageId) Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer.default ThreadChannelActioncreateThreadChannel(String name, String messageId) Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer.default List<ThreadChannel>Finds allThreadChannelswhose parent is this channel.Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, getAsMention, getJDA, getName, getTypeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
delete, getGuild, getPermissionContainerMethods inherited from interface net.dv8tion.jda.api.entities.IPermissionContainer
createPermissionOverride, getManager, getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, putPermissionOverride, upsertPermissionOverrideMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getThreadChannels
Finds allThreadChannelswhose parent is this channel.- Returns:
- a list of all ThreadChannel children.
-
createThreadChannel
Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer. This requires the bot to have thePermission.VIEW_CHANNELandPermission.CREATE_PUBLIC_THREADSpermissions. The resultingThreadChannelmay be either one of:Possible
ErrorResponsescaused by the returnedRestActioninclude 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.
- Parameters:
name- The name of the new ThreadChannel- Returns:
- A specific
ThreadChannelActionthat may be used to configure the new ThreadChannel before its creation.
-
createThreadChannel
Creates a newThreadChannelwith the parent channel being thisIThreadContainer. This requires the bot to have thePermission.VIEW_CHANNELandPermission.CREATE_PUBLIC_THREADSpermissions. The resultingThreadChannelmay be one of:Possible
ErrorResponsescaused by the returnedRestActioninclude 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.
- Parameters:
name- The name of the new ThreadChannelisPrivate- The public/private status of the new ThreadChannel. If true, the new ThreadChannel will be private.- Returns:
- A specific
ThreadChannelActionthat may be used to configure the new ThreadChannel before its creation. - Throws:
InsufficientPermissionException- if the ThreadChannel is set to private, and the logged in account does not havePermission.CREATE_PRIVATE_THREADS.
-
createThreadChannel
Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer. This ThreadChannel will be spawned from the given messageID, and will consequently share its ID with the message. This requires the bot to havePermission.VIEW_CHANNELandPermission.CREATE_PUBLIC_THREADSpermissions. The resultingThreadChannelmay be one of:Possible
ErrorResponsescaused by the returnedRestActioninclude 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.
- Parameters:
name- The name of the new ThreadChannelmessageId- The ID of the message from which this ThreadChannel will be spawned.- Returns:
- A specific
ThreadChannelActionthat may be used to configure the new ThreadChannel before its creation.
-
createThreadChannel
@Nonnull @CheckReturnValue default ThreadChannelAction createThreadChannel(String name, String messageId) Creates a new, publicThreadChannelwith the parent channel being thisIThreadContainer. This ThreadChannel will be spawned from the given messageID, and will consequently share its ID with the message. This requires the bot to havePermission.VIEW_CHANNELandPermission.CREATE_PUBLIC_THREADSpermissions. The resultingThreadChannelmay be one of:Possible
ErrorResponsescaused by the returnedRestActioninclude 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.
- Parameters:
name- The name of the new ThreadChannelmessageId- The ID of the message from which this ThreadChannel will be spawned.- Returns:
- A specific
ThreadChannelActionthat may be used to configure the new ThreadChannel before its creation.
-
retrieveArchivedPublicThreadChannels
-
retrieveArchivedPrivateThreadChannels
-
retrieveArchivedPrivateJoinedThreadChannels
@Nonnull @CheckReturnValue ThreadChannelPaginationAction retrieveArchivedPrivateJoinedThreadChannels()
-