Interface IGuildChannelContainer<C extends Channel>
- All Known Subinterfaces:
- Guild,- JDA,- ShardManager
- All Known Implementing Classes:
- DefaultShardManager
These getters only check the caches with the relevant scoping of the implementing type.
 For example, Guild returns channels that exist within the guild,
 whereas JDA or ShardManager returns any channels that exist within the shard.
 
If this is called on JDA or ShardManager, this may return null immediately after building, because the cache isn't initialized yet.
 To make sure the cache is initialized after building your JDA instance, you can use JDA.awaitReady().
 
For the most efficient usage, it is recommended to use CacheView getters such as getTextChannelCache().
 List getters usually require making a snapshot copy of the underlying cache view, which may introduce an undesirable performance hit.
- 
Method SummaryModifier and TypeMethodDescriptionGets allCategoriesin the cache.getCategoriesByName(String name, boolean ignoreCase) Gets a list of allCategoriesin this Guild that have the same name as the one provided.default CategorygetCategoryById(long id) Gets aCategorythat has the same id as the one provided.default CategoryGets aCategorythat has the same id as the one provided.SortedSnowflakeCacheViewofCategory.default <T extends C>
 TgetChannelById(Class<T> type, long id) Get a channel of the specified type by id.default <T extends C>
 TgetChannelById(Class<T> type, String id) Get a channel of the specified type by id.Unified cache of all channels associated with this shard or guild.default ForumChannelgetForumChannelById(long id) Gets aForumChannelthat has the same id as the one provided.default ForumChannelGets aForumChannelthat has the same id as the one provided.default @Unmodifiable List<ForumChannel> Gets allForumChannelin the cache.default @Unmodifiable List<ForumChannel> getForumChannelsByName(String name, boolean ignoreCase) Gets a list of allForumChannelsin this Guild that have the same name as the one provided.default GuildChannelgetGuildChannelById(long id) GetGuildChannelfor the provided ID.default GuildChannelGetGuildChannelfor the provided ID.default GuildChannelgetGuildChannelById(ChannelType type, long id) GetGuildChannelfor the provided ID.default GuildChannelgetGuildChannelById(ChannelType type, String id) GetGuildChannelfor the provided ID.default MediaChannelgetMediaChannelById(long id) Gets aMediaChannelthat has the same id as the one provided.default MediaChannelGets aMediaChannelthat has the same id as the one provided.default @Unmodifiable List<MediaChannel> Gets allMediaChannelin the cache.default @Unmodifiable List<MediaChannel> getMediaChannelsByName(String name, boolean ignoreCase) Gets a list of allMediaChannelsin this Guild that have the same name as the one provided.default NewsChannelgetNewsChannelById(long id) Gets aNewsChannelthat has the same id as the one provided.default NewsChannelGets aNewsChannelthat has the same id as the one provided.SortedSnowflakeCacheViewofNewsChannel.default @Unmodifiable List<NewsChannel> Gets allNewsChannelsin the cache.default @Unmodifiable List<NewsChannel> getNewsChannelsByName(String name, boolean ignoreCase) Gets a list of allNewsChannelsin this Guild that have the same name as the one provided.default StageChannelgetStageChannelById(long id) Gets aStageChannelthat has the same id as the one provided.default StageChannelGets aStageChannelthat has the same id as the one provided.SortedSnowflakeCacheViewofStageChannel.default @Unmodifiable List<StageChannel> Gets allStageChannelsin the cache.default @Unmodifiable List<StageChannel> getStageChannelsByName(String name, boolean ignoreCase) Gets a list of allStageChannelsin this Guild that have the same name as the one provided.default TextChannelgetTextChannelById(long id) Gets aTextChannelthat has the same id as the one provided.default TextChannelGets aTextChannelthat has the same id as the one provided.SortedSnowflakeCacheViewofTextChannel.default @Unmodifiable List<TextChannel> Gets allTextChannelsin the cache.default @Unmodifiable List<TextChannel> getTextChannelsByName(String name, boolean ignoreCase) Gets a list of allTextChannelsin this Guild that have the same name as the one provided.default ThreadChannelgetThreadChannelById(long id) Gets aThreadChannelthat has the same id as the one provided.default ThreadChannelGets aThreadChannelthat has the same id as the one provided.default @Unmodifiable List<ThreadChannel> Gets allThreadChannelin the cache.default @Unmodifiable List<ThreadChannel> getThreadChannelsByName(String name, boolean ignoreCase) Gets a list of allThreadChannelsin this Guild that have the same name as the one provided.default VoiceChannelgetVoiceChannelById(long id) Gets aVoiceChannelthat has the same id as the one provided.default VoiceChannelGets aVoiceChannelthat has the same id as the one provided.SortedSnowflakeCacheViewofVoiceChannel.default @Unmodifiable List<VoiceChannel> Gets allVoiceChannelsin the cache.default @Unmodifiable List<VoiceChannel> getVoiceChannelsByName(String name, boolean ignoreCase) Gets a list of allVoiceChannelsin this Guild that have the same name as the one provided.
- 
Method Details- 
getChannelCacheUnified cache of all channels associated with this shard or guild.This ChannelCacheViewstores all channels in individually typed maps based onChannelType. You can useChannelCacheView.getElementById(ChannelType, long)orChannelCacheView.ofType(Class)to filter out more specific types.- Returns:
- ChannelCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getChannelByIdGet a channel of the specified type by id.This will automatically check for all channel types and cast to the specified class. If a channel with the specified id does not exist, or exists but is not an instance of the provided class, this returns null. - Type Parameters:
- T- The type argument for the class
- Parameters:
- type-- Classof a channel type
- id- The snowflake id of the channel
- Returns:
- The casted channel, if it exists and is assignable to the provided class, or null
- Throws:
- IllegalArgumentException- If null is provided, or the id is not a valid snowflake
- DetachedEntityException- If this entity is- detached
 
- 
getChannelByIdGet a channel of the specified type by id.This will automatically check for all channel types and cast to the specified class. If a channel with the specified id does not exist, or exists but is not an instance of the provided class, this returns null. - Type Parameters:
- T- The type argument for the class
- Parameters:
- type-- Classof a channel type
- id- The snowflake id of the channel
- Returns:
- The casted channel, if it exists and is assignable to the provided class, or null
- Throws:
- IllegalArgumentException- If null is provided
- DetachedEntityException- If this entity is- detached
 
- 
getGuildChannelByIdGetGuildChannelfor the provided ID.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().To get more specific channel types you can use one of the following: - Parameters:
- id- The ID of the channel
- Returns:
- The GuildChannel or null
- Throws:
- IllegalArgumentException- If the provided ID is null
- NumberFormatException- If the provided ID is not a snowflake
- DetachedEntityException- If this entity is- detached
 
- 
getGuildChannelByIdGetGuildChannelfor the provided ID.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().To get more specific channel types you can use one of the following: - Parameters:
- id- The ID of the channel
- Returns:
- The GuildChannel or null
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getGuildChannelByIdGetGuildChannelfor the provided ID.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().
 This is meant for systems that use a dynamicChannelTypeand can profit from a simple function to get the channel instance.To get more specific channel types you can use one of the following: - Parameters:
- type- The- ChannelType
- id- The ID of the channel
- Returns:
- The GuildChannel or null
- Throws:
- IllegalArgumentException- If the provided ID is null
- NumberFormatException- If the provided ID is not a snowflake
- DetachedEntityException- If this entity is- detached
 
- 
getGuildChannelByIdGetGuildChannelfor the provided ID.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().
 This is meant for systems that use a dynamicChannelTypeand can profit from a simple function to get the channel instance.To get more specific channel types you can use one of the following: - Parameters:
- type- The- ChannelType
- id- The ID of the channel
- Returns:
- The GuildChannel or null
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getStageChannelCacheSortedSnowflakeCacheViewofStageChannel.
 InGuildcache, channels are sorted according to their position and id.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SortedSnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getStageChannelsByName@Nonnull default @Unmodifiable List<StageChannel> getStageChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allStageChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- StageChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all StageChannel names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getStageChannelByIdGets aStageChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- StageChannel.
- Returns:
- Possibly-null StageChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getStageChannelByIdGets aStageChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- StageChannel.
- Returns:
- Possibly-null StageChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getStageChannelsGets allStageChannelsin the cache.
 InGuildcache, channels are sorted according to their position and id.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 getStageChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of StageChannels.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getThreadChannelCacheSnowflakeCacheViewofThreadChannel.These threads can also represent posts in ForumChannels.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getThreadChannelsByName@Nonnull default @Unmodifiable List<ThreadChannel> getThreadChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allThreadChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.These threads can also represent posts in ForumChannels.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- ThreadChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all ThreadChannel names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getThreadChannelByIdGets aThreadChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.These threads can also represent posts in ForumChannels.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- ThreadChannel.
- Returns:
- Possibly-null ThreadChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getThreadChannelByIdGets aThreadChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.These threads can also represent posts in ForumChannels.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- ThreadChannel.
- Returns:
- Possibly-null ThreadChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getThreadChannelsGets allThreadChannelin the cache.These threads can also represent posts in ForumChannels.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 getThreadChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of ThreadChannels.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getCategoryCacheSortedSnowflakeCacheViewofCategory.
 InGuildcache, channels are sorted according to their position and id.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SortedSnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getCategoriesByName@Nonnull default @Unmodifiable List<Category> getCategoriesByName(@Nonnull String name, boolean ignoreCase) Gets a list of allCategoriesin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name to check
- ignoreCase- Whether to ignore case on name checking
- Returns:
- Immutable list of all categories matching the provided name
- Throws:
- IllegalArgumentException- If the provided name is- null
- DetachedEntityException- If this entity is- detached
 
- 
getCategoryByIdGets aCategorythat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The snowflake ID of the wanted Category
- Returns:
- Possibly-null Categoryfor the provided ID.
- Throws:
- IllegalArgumentException- If the provided ID is not a valid- long
- DetachedEntityException- If this entity is- detached
 
- 
getCategoryByIdGets aCategorythat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The snowflake ID of the wanted Category
- Returns:
- Possibly-null Categoryfor the provided ID.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getCategoriesGets allCategoriesin the cache.
 InGuildcache, channels are sorted according to their position and id.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 getCategoryCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable list of all Categoriesin this Guild.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getTextChannelCacheSortedSnowflakeCacheViewofTextChannel.
 InGuildcache, channels are sorted according to their position and id.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SortedSnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getTextChannelsByName@Nonnull default @Unmodifiable List<TextChannel> getTextChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allTextChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- TextChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all TextChannels names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getTextChannelByIdGets aTextChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- TextChannel.
- Returns:
- Possibly-null TextChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getTextChannelByIdGets aTextChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- TextChannel.
- Returns:
- Possibly-null TextChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getTextChannelsGets allTextChannelsin the cache.
 InGuildcache, channels are sorted according to their position and id.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 getTextChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of all TextChannelsin this Guild.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getNewsChannelCacheSortedSnowflakeCacheViewofNewsChannel.
 InGuildcache, channels are sorted according to their position and id.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SortedSnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getNewsChannelsByName@Nonnull default @Unmodifiable List<NewsChannel> getNewsChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allNewsChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- NewsChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all NewsChannels names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getNewsChannelByIdGets aNewsChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- NewsChannel.
- Returns:
- Possibly-null NewsChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getNewsChannelByIdGets aNewsChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- NewsChannel.
- Returns:
- Possibly-null NewsChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getNewsChannelsGets allNewsChannelsin the cache.
 InGuildcache, channels are sorted according to their position and id.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 getNewsChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of all NewsChannelsin this Guild.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getVoiceChannelCacheSortedSnowflakeCacheViewofVoiceChannel.
 InGuildcache, channels are sorted according to their position and id.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SortedSnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getVoiceChannelsByName@Nonnull default @Unmodifiable List<VoiceChannel> getVoiceChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allVoiceChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- VoiceChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all VoiceChannel names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getVoiceChannelByIdGets aVoiceChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- VoiceChannel.
- Returns:
- Possibly-null VoiceChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getVoiceChannelByIdGets aVoiceChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- VoiceChannel.
- Returns:
- Possibly-null VoiceChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getVoiceChannelsGets allVoiceChannelsin the cache.
 InGuildcache, channels are sorted according to their position and id.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 getVoiceChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of VoiceChannels.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getForumChannelCacheSnowflakeCacheViewofForumChannel.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getForumChannelsByName@Nonnull default @Unmodifiable List<ForumChannel> getForumChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allForumChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- ForumChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all ForumChannel names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getForumChannelByIdGets aForumChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- ForumChannel.
- Returns:
- Possibly-null ForumChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getForumChannelByIdGets aForumChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- ForumChannel.
- Returns:
- Possibly-null ForumChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getForumChannelsGets allForumChannelin the cache.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 getForumChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of ForumChannel.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getMediaChannelCacheSnowflakeCacheViewofMediaChannel.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- SnowflakeCacheView
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getMediaChannelsByName@Nonnull default @Unmodifiable List<MediaChannel> getMediaChannelsByName(@Nonnull String name, boolean ignoreCase) Gets a list of allMediaChannelsin this Guild that have the same name as the one provided.
 If there are no channels with the provided name, then this returns an empty list.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- name- The name used to filter the returned- MediaChannels.
- ignoreCase- Determines if the comparison ignores case when comparing. True - case insensitive.
- Returns:
- Possibly-empty immutable list of all ForumChannel names that match the provided name.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getMediaChannelByIdGets aMediaChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- MediaChannel.
- Returns:
- Possibly-null MediaChannelwith matching id.
- Throws:
- NumberFormatException- If the provided- idcannot be parsed by- Long.parseLong(String)
- DetachedEntityException- If this entity is- detached
 
- 
getMediaChannelByIdGets aMediaChannelthat has the same id as the one provided.
 If there is no channel with an id that matches the provided one, then this returnsnull.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Parameters:
- id- The id of the- MediaChannel.
- Returns:
- Possibly-null MediaChannelwith matching id.
- Throws:
- DetachedEntityException- If this entity is- detached
 
- 
getMediaChannelsGets allMediaChannelin the cache.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 getForumChannelCache()and use its more efficient versions of handling these values.This getter exists on any instance of IGuildChannelContainerand only checks the caches with the relevant scoping. ForGuild,JDA, orShardManager, this returns the relevant channel with respect to the cache within each of those objects. For a guild, this would mean it only returns channels within the same guild.
 If this is called onJDAorShardManager, this may return null immediately after building, because the cache isn't initialized yet. To make sure the cache is initialized after building yourJDAinstance, you can useJDA.awaitReady().- Returns:
- An immutable List of MediaChannel.
- Throws:
- DetachedEntityException- If this entity is- detached
 
 
-