Interface ICategorizableChannel
- All Superinterfaces:
Channel,Comparable<GuildChannel>,Formattable,GuildChannel,IDetachableEntity,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
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTHFields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL -
Method Summary
Modifier and TypeMethodDescriptionReturns theChannelManagerfor this GuildChannel.default CategoryParentCategoryof this GuildChannel.default StringGet the snowflake of theCategorythat contains this channel.longGet the snowflake of theCategorythat contains this channel.default intComputes the relative position of this channel in theparent category.booleanisSynced()Whether or not this GuildChannel'sPermissionOverridesmatch those ofits parent category.Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getTypeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainerMethods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetachedMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverrideMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPositionableChannel
getPosition, getPositionRawMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getManager
Description copied from interface:GuildChannelReturns theChannelManagerfor 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:
getManagerin interfaceGuildChannel- Specified by:
getManagerin interfaceIPermissionContainer- Specified by:
getManagerin 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
-1if no parent is set - Throws:
DetachedEntityException- If this entity isdetached
-
getParentCategoryIdLong
long getParentCategoryIdLong()Get the snowflake of theCategorythat contains this channel.This will return
0if 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 theCategorythat contains this channel.This will return
nullif this channel doesn't have a parent category.- Returns:
- Possibly-null String representation of the Discord ID snowflake of the parent channel.
-
getParentCategory
ParentCategoryof this GuildChannel. Channels don't need to have a parent Category.
Note that aCategorywill always returnnullfor this method as nested categories are not supported.- Returns:
- Possibly-null
Categoryfor this GuildChannel - Throws:
DetachedEntityException- If this entity isdetached
-
isSynced
boolean isSynced()Whether or not this GuildChannel'sPermissionOverridesmatch those ofits parent category. If the channel doesn't have a parent category, this will return true.This requires
CacheFlag.MEMBER_OVERRIDESto be enabled.createLight(String)disables this CacheFlag by default.- Returns:
- True, if this channel is synced with its parent category
- Throws:
DetachedEntityException- If this entity isdetached- Since:
- 4.2.1
-