Package net.dv8tion.jda.api.entities
Interface ThreadChannel
-
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,GuildMessageChannel
,IMemberContainer
,IMentionable
,ISnowflake
,MessageChannel
public interface ThreadChannel extends GuildMessageChannel, IMemberContainer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ThreadChannel.AutoArchiveDuration
-
Method Summary
-
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
getAsMention, getJDA, getName, getType
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
delete, getGuild, getPermissionContainer
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildMessageChannel
canTalk, canTalk, clearReactionsById, clearReactionsById, clearReactionsById, clearReactionsById, clearReactionsById, clearReactionsById, deleteMessages, deleteMessagesByIds, removeReactionById, removeReactionById, removeReactionById, removeReactionById
-
Methods inherited from interface net.dv8tion.jda.api.entities.IMemberContainer
getMembers
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Methods inherited from interface net.dv8tion.jda.api.entities.MessageChannel
addReactionById, addReactionById, addReactionById, addReactionById, deleteMessageById, deleteMessageById, editMessageById, editMessageById, editMessageById, editMessageById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageEmbedsById, editMessageEmbedsById, editMessageEmbedsById, editMessageEmbedsById, editMessageFormatById, editMessageFormatById, getHistory, getHistoryAfter, getHistoryAfter, getHistoryAfter, getHistoryAround, getHistoryAround, getHistoryAround, getHistoryBefore, getHistoryBefore, getHistoryBefore, getHistoryFromBeginning, getIterableHistory, getLatestMessageId, getLatestMessageIdLong, hasLatestMessage, pinMessageById, pinMessageById, purgeMessages, purgeMessages, purgeMessagesById, purgeMessagesById, purgeMessagesById, removeReactionById, removeReactionById, removeReactionById, removeReactionById, retrieveMessageById, retrieveMessageById, retrievePinnedMessages, retrieveReactionUsersById, retrieveReactionUsersById, retrieveReactionUsersById, retrieveReactionUsersById, sendFile, sendFile, sendFile, sendFile, sendMessage, sendMessage, sendMessageEmbeds, sendMessageEmbeds, sendMessageFormat, sendTyping, unpinMessageById, unpinMessageById
-
-
-
-
Method Detail
-
isPublic
default boolean isPublic()
-
getMessageCount
int getMessageCount()
-
getMemberCount
int getMemberCount()
-
isJoined
default boolean isJoined()
-
isLocked
boolean isLocked()
-
isInvitable
boolean isInvitable()
-
getParentChannel
@Nonnull IThreadContainer getParentChannel()
-
getParentMessageChannel
@Nonnull default GuildMessageChannel getParentMessageChannel()
-
getSelfThreadMember
@Nullable default ThreadMember getSelfThreadMember()
-
getThreadMembers
@Nonnull List<ThreadMember> getThreadMembers()
-
getThreadMember
@Nullable default ThreadMember getThreadMember(Member member)
-
getThreadMember
@Nullable default ThreadMember getThreadMember(User user)
-
getThreadMemberById
@Nullable default ThreadMember getThreadMemberById(String id)
-
getThreadMemberById
@Nullable ThreadMember getThreadMemberById(long id)
-
retrieveThreadMember
@Nonnull @CheckReturnValue default RestAction<ThreadMember> retrieveThreadMember(@Nonnull Member member)
Load the thread-member for the specified user.
If the thread-member is already loaded it, will be retrieved fromgetThreadMemberById(long)
and immediately provided if the thread-member information is consistent. If the bot hasn't joined the thread,GatewayIntent.GUILD_MEMBERS
is required to keep the cache updated.- Parameters:
member
- The member to load the thread-member from- Returns:
RestAction
- Type:ThreadMember
- Throws:
IllegalArgumentException
- If provided with null
-
retrieveThreadMember
@Nonnull @CheckReturnValue default RestAction<ThreadMember> retrieveThreadMember(@Nonnull User user)
Load the thread-member for the specified user.
If the thread-member is already loaded, it will be retrieved fromgetThreadMemberById(long)
and immediately provided if the thread-member information is consistent. If the bot hasn't joined the thread,GatewayIntent.GUILD_MEMBERS
is required to keep the cache updated.- Parameters:
user
- The user to load the thread-member from- Returns:
RestAction
- Type:ThreadMember
- Throws:
IllegalArgumentException
- If provided with null
-
retrieveThreadMemberById
@Nonnull @CheckReturnValue default RestAction<ThreadMember> retrieveThreadMemberById(@Nonnull String id)
Load the thread-member for the user with the specified id.
If the thread-member is already loaded, it will be retrieved fromgetThreadMemberById(long)
and immediately provided if the thread-member information is consistent. If the bot hasn't joined the thread,GatewayIntent.GUILD_MEMBERS
is required to keep the cache updated.- Parameters:
id
- The user id to load the thread-member from- Returns:
RestAction
- Type:ThreadMember
- Throws:
IllegalArgumentException
- If the provided id is empty or nullNumberFormatException
- If the provided id is not a snowflake
-
retrieveThreadMemberById
@Nonnull @CheckReturnValue RestAction<ThreadMember> retrieveThreadMemberById(long id)
Load the thread-member for the user with the specified id.
If the thread-member is already loaded, it will be retrieved fromgetThreadMemberById(long)
and immediately provided if the thread-member information is consistent. If the bot hasn't joined the thread,GatewayIntent.GUILD_MEMBERS
is required to keep the cache updated.- Parameters:
id
- The user id to load the thread-member from- Returns:
RestAction
- Type:ThreadMember
-
retrieveThreadMembers
@CheckReturnValue RestAction<List<ThreadMember>> retrieveThreadMembers()
-
isOwner
default boolean isOwner()
-
getOwnerIdLong
long getOwnerIdLong()
-
getOwnerThreadMember
@Nullable default ThreadMember getOwnerThreadMember()
-
isArchived
boolean isArchived()
-
getTimeArchiveInfoLastModified
OffsetDateTime getTimeArchiveInfoLastModified()
-
getAutoArchiveDuration
@Nonnull ThreadChannel.AutoArchiveDuration getAutoArchiveDuration()
-
getSlowmode
int getSlowmode()
-
join
@CheckReturnValue RestAction<Void> join()
-
leave
@CheckReturnValue RestAction<Void> leave()
-
addThreadMemberById
@CheckReturnValue RestAction<Void> addThreadMemberById(long id)
-
addThreadMemberById
@CheckReturnValue default RestAction<Void> addThreadMemberById(@Nonnull String id)
-
addThreadMember
@CheckReturnValue default RestAction<Void> addThreadMember(@Nonnull User user)
-
addThreadMember
@CheckReturnValue default RestAction<Void> addThreadMember(@Nonnull Member member)
-
removeThreadMemberById
@CheckReturnValue RestAction<Void> removeThreadMemberById(long id)
-
removeThreadMemberById
@CheckReturnValue default RestAction<Void> removeThreadMemberById(@Nonnull String id)
-
removeThreadMember
@CheckReturnValue default RestAction<Void> removeThreadMember(@Nonnull User user)
-
removeThreadMember
@CheckReturnValue default RestAction<Void> removeThreadMember(@Nonnull Member member)
-
getManager
@Nonnull ThreadChannelManager getManager()
Description copied from interface:GuildChannel
Returns theChannelManager
for this GuildChannel.
In the ChannelManager, you can modify the name, topic and position of this GuildChannel. You modify multiple fields in one request by chaining setters before callingRestAction.queue()
.This is a lazy idempotent getter. The manager is retained after the first call. This getter is not thread-safe and would require guards by the user.
- Specified by:
getManager
in interfaceGuildChannel
- Returns:
- The ChannelManager of this GuildChannel
-
formatTo
default void formatTo(Formatter formatter, int flags, int width, int precision)
- Specified by:
formatTo
in interfaceChannel
- Specified by:
formatTo
in interfaceFormattable
- Specified by:
formatTo
in interfaceIMentionable
-
-