Interface ICategorizableChannel
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,IMentionable
,IPermissionContainer
,IPositionableChannel
,ISnowflake
- All Known Subinterfaces:
AudioChannel
,AudioChannelUnion
,DefaultGuildChannelUnion
,ForumChannel
,MediaChannel
,NewsChannel
,StageChannel
,StandardGuildChannel
,StandardGuildMessageChannel
,TextChannel
,VoiceChannel
public interface ICategorizableChannel
extends GuildChannel, IPermissionContainer, IPositionableChannel
Represents a channel that can be a member of a
Category
.
Channels represented by this interface can have a parent Category
.- See Also:
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTH
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
-
Method Summary
Modifier and TypeMethodDescriptionReturns theChannelManager
for this GuildChannel.default Category
ParentCategory
of this GuildChannel.default String
Get the snowflake of theCategory
that contains this channel.long
Get the snowflake of theCategory
that contains this channel.default int
Computes the relative position of this channel in theparent category
.boolean
isSynced()
Whether or not this GuildChannel'sPermissionOverrides
match those ofits parent category
.Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getType
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainer
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverride
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPositionableChannel
getPosition, getPositionRaw
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
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()
.- Specified by:
getManager
in interfaceGuildChannel
- Specified by:
getManager
in interfaceIPermissionContainer
- Specified by:
getManager
in interfaceIPositionableChannel
- Returns:
- The ChannelManager of this GuildChannel
-
getPositionInCategory
default int getPositionInCategory()Computes the relative position of this channel in theparent category
.
This is effectively the same asgetParentCategory().getChannels().indexOf(channel)
.- Returns:
- The relative position in the parent category, or
-1
if no parent is set
-
getParentCategoryIdLong
long getParentCategoryIdLong()Get the snowflake of theCategory
that contains this channel.This will return
0
if this channel doesn't have a parent category.- Returns:
- The Discord ID snowflake of the parent channel as a long.
-
getParentCategoryId
Get the snowflake of theCategory
that contains this channel.This will return
null
if this channel doesn't have a parent category.- Returns:
- Possibly-null String representation of the Discord ID snowflake of the parent channel.
-
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
-