Package net.dv8tion.jda.api.entities
Interface ICategorizableChannel
-
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,IMentionable
,IPermissionContainer
,ISnowflake
- All Known Subinterfaces:
BaseGuildMessageChannel
,NewsChannel
,StageChannel
,StoreChannel
,TextChannel
,VoiceChannel
public interface ICategorizableChannel extends GuildChannel, IPermissionContainer
Represents a channel that can be a member of aCategory
. Channels represented by this interface can have a parentCategory
.- See Also:
Category
,IGuildChannelContainer.getCategories()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ICategorizableChannelManager<?,?>
getManager()
Returns theChannelManager
for this GuildChannel.default Category
getParentCategory()
ParentCategory
of this GuildChannel.default String
getParentCategoryId()
Get the snowflake of theCategory
that contains this channel.long
getParentCategoryIdLong()
Get the snowflake of theCategory
that contains this channel.boolean
isSynced()
Whether or not this GuildChannel'sPermissionOverrides
match those ofits parent category
.-
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, 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.IPermissionContainer
createPermissionOverride, getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, putPermissionOverride, upsertPermissionOverride
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getManager
@Nonnull ICategorizableChannelManager<?,?> 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
- Specified by:
getManager
in interfaceIPermissionContainer
- Returns:
- The ChannelManager of this GuildChannel
-
getParentCategoryIdLong
long getParentCategoryIdLong()
Get the snowflake of theCategory
that contains this channel. This will return0
if this channel doesn't have a parent category.- Returns:
- The Discord ID snowflake of the parent channel as a long.
-
getParentCategoryId
@Nullable default String getParentCategoryId()
Get the snowflake of theCategory
that contains this channel. This will returnnull
if this channel doesn't have a parent category.- Returns:
- Possibly-null String representation of the Discord ID snowflake of the parent channel.
-
getParentCategory
@Nullable default Category getParentCategory()
ParentCategory
of this GuildChannel. Channels don't need to have a parent Category.
Note that aCategory
will always returnnull
for this method as nested categories are not supported.- Returns:
- Possibly-null
Category
for this GuildChannel
-
isSynced
boolean isSynced()
Whether or not this GuildChannel'sPermissionOverrides
match those ofits parent category
. If the channel doesn't have a parent category, this will return true.This requires
CacheFlag.MEMBER_OVERRIDES
to be enabled.createLight(String)
disables this CacheFlag by default.- Returns:
- True, if this channel is synced with its parent category
- Since:
- 4.2.1
-
-