Skip to content

Commit

Permalink
Add details about posts being threads in some more places (#2493)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment authored Jul 1, 2023
1 parent 7b49c56 commit 163baf4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ default List<StageChannel> getStageChannels()
/**
* {@link net.dv8tion.jda.api.utils.cache.SnowflakeCacheView SnowflakeCacheView} of {@link ThreadChannel}.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* <p>This getter exists on any instance of {@link IGuildChannelContainer} and only checks the caches with the relevant scoping.
* For {@link Guild}, {@link JDA}, or {@link ShardManager},
* this returns the relevant channel with respect to the cache within each of those objects.
Expand All @@ -421,6 +423,8 @@ default List<StageChannel> getStageChannels()
* in this Guild that have the same name as the one provided.
* <br>If there are no channels with the provided name, then this returns an empty list.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* <p>This getter exists on any instance of {@link IGuildChannelContainer} and only checks the caches with the relevant scoping.
* For {@link Guild}, {@link JDA}, or {@link ShardManager},
* this returns the relevant channel with respect to the cache within each of those objects.
Expand All @@ -445,6 +449,8 @@ default List<ThreadChannel> getThreadChannelsByName(@Nonnull String name, boolea
* Gets a {@link ThreadChannel ThreadChannel} that has the same id as the one provided.
* <br>If there is no channel with an id that matches the provided one, then this returns {@code null}.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* <p>This getter exists on any instance of {@link IGuildChannelContainer} and only checks the caches with the relevant scoping.
* For {@link Guild}, {@link JDA}, or {@link ShardManager},
* this returns the relevant channel with respect to the cache within each of those objects.
Expand All @@ -470,6 +476,8 @@ default ThreadChannel getThreadChannelById(@Nonnull String id)
* Gets a {@link ThreadChannel ThreadChannel} that has the same id as the one provided.
* <br>If there is no channel with an id that matches the provided one, then this returns {@code null}.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* <p>This getter exists on any instance of {@link IGuildChannelContainer} and only checks the caches with the relevant scoping.
* For {@link Guild}, {@link JDA}, or {@link ShardManager},
* this returns the relevant channel with respect to the cache within each of those objects.
Expand All @@ -491,6 +499,8 @@ default ThreadChannel getThreadChannelById(long id)
/**
* Gets all {@link ThreadChannel ThreadChannel} in the cache.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* <p>This copies the backing store into a list. This means every call
* creates a new list with O(n) complexity. It is recommended to store this into
* a local variable or use {@link #getThreadChannelCache()} and use its more efficient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public interface IThreadContainer extends GuildChannel, IPermissionContainer
/**
* Finds all {@link ThreadChannel ThreadChannels} whose parent is this channel.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* @return Immutable list of all ThreadChannel children.
*/
default List<ThreadChannel> getThreadChannels()
Expand Down Expand Up @@ -260,6 +262,8 @@ default ThreadChannelAction createThreadChannel(@Nonnull String name, @Nonnull S
*
* <p>You can use {@link #retrieveArchivedPrivateThreadChannels()}, to get all <em>private</em> archived threads.
*
* <p>These threads can also represent posts in {@link net.dv8tion.jda.api.entities.channel.concrete.ForumChannel ForumChannels}.
*
* @throws InsufficientPermissionException
* If the bot does not have {@link net.dv8tion.jda.api.Permission#MESSAGE_HISTORY Permission.MESSAGE_HISTORY} in this channel
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

/**
* Represents Discord Message Threads of all kinds.
* <br>These are also referred to as "posts" in the context of {@link ForumChannel Forum Channels}.
*
* <p>This includes all thread channel types, namely:
* <ul>
* <li>{@link ChannelType#GUILD_PUBLIC_THREAD}</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

/**
* Result of creating a post in a {@link ForumChannel}.
* <br>This is a utility class for {@link ForumChannel#createForumPost(String, MessageCreateData)},
* the actual post itself is only the {@link #getThreadChannel() thread channel}.
*
* @see ForumChannel#createForumPost(String, MessageCreateData)
* @see #getThreadChannel()
Expand Down Expand Up @@ -54,7 +56,7 @@ public Message getMessage()
}

/**
* The {@link ThreadChannel} of the post.
* The {@link ThreadChannel} representing the post.
* <br>This will use the name provided to {@link ForumChannel#createForumPost(String, MessageCreateData)}.
*
* @return The forum post thread channel
Expand Down

0 comments on commit 163baf4

Please sign in to comment.