Class DetachedForumChannelImpl
- All Implemented Interfaces:
Comparable<GuildChannel>
,Formattable
,IAgeRestrictedChannel
,ICategorizableChannel
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IPermissionContainer
,IPositionableChannel
,IPostContainer
,ISlowmodeChannel
,IThreadContainer
,IWebhookContainer
,Channel
,ForumChannel
,GuildChannel
,StandardGuildChannel
,ChannelUnion
,GuildChannelUnion
,IPermissionContainerUnion
,IThreadContainerUnion
,IWebhookContainerUnion
,IDetachableEntity
,IMentionable
,ISnowflake
,IAgeRestrictedChannelMixin<DetachedForumChannelImpl>
,ICategorizableChannelMixin<DetachedForumChannelImpl>
,IInteractionPermissionMixin<DetachedForumChannelImpl>
,IInviteContainerMixin<DetachedForumChannelImpl>
,IPermissionContainerMixin<DetachedForumChannelImpl>
,IPositionableChannelMixin<DetachedForumChannelImpl>
,IPostContainerMixin<DetachedForumChannelImpl>
,ISlowmodeChannelMixin<DetachedForumChannelImpl>
,IThreadContainerMixin<DetachedForumChannelImpl>
,ITopicChannelMixin<DetachedForumChannelImpl>
,IWebhookContainerMixin<DetachedForumChannelImpl>
,ChannelMixin<DetachedForumChannelImpl>
,ForumChannelMixin<DetachedForumChannelImpl>
,GuildChannelMixin<DetachedForumChannelImpl>
,StandardGuildChannelMixin<DetachedForumChannelImpl>
,IDetachableEntityMixin
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.channel.concrete.ForumChannel
ForumChannel.Layout
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPostContainer
IPostContainer.SortOrder
-
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.concrete.ForumChannel
MAX_FORUM_TOPIC_LENGTH, MAX_POST_TAGS
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
Fields inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPostContainer
MAX_POST_CONTAINER_TOPIC_LENGTH, MAX_POST_TAGS
Fields inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel
MAX_SLOWMODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe availableForumTags
for this forum channel.The default layout used to show threads.The emoji which will show up on new forum posts as default reaction.The default order used to show threads.int
The defaultslowmode
for thread channels that is copied on thread creation.getFlags()
The flags configured for this channel.Returns theChannelManager
for this GuildChannel.A List of allMembers
that are in this GuildChannel
ForTextChannels
, this returns all Members with thePermission.VIEW_CHANNEL
Permission.long
Get the snowflake of theCategory
that contains this channel.gnu.trove.map.TLongObjectMap
<PermissionOverride> int
The actual position of theGuildChannel
as stored and given by Discord.int
int
int
int
The slowmode set for this channel.getTopic()
The topic set for this channel, this is referred to as Guidelines in the official Discord client.boolean
Whether this entity is detached.boolean
isNSFW()
Whether this channel is considered as age-restricted, also known as NSFW (Not-Safe-For-Work)setDefaultLayout
(int layout) setDefaultReaction
(DataObject emoji) setDefaultSortOrder
(int defaultSortOrder) setDefaultThreadSlowmode
(int defaultThreadSlowmode) setFlags
(int flags) setInteractionPermissions
(ChannelInteractionPermissions interactionPermissions) setNSFW
(boolean nsfw) setParentCategory
(long parentCategoryId) setPosition
(int position) setSlowmode
(int slowmode) Methods inherited from class net.dv8tion.jda.internal.entities.channel.middleman.AbstractGuildChannelImpl
compareTo, getGuild
Methods inherited from class net.dv8tion.jda.internal.entities.channel.AbstractChannelImpl
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel, getIdLong, getJDA, getName, setName, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getJDA, getName
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.ChannelMixin
delete, setName
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.ChannelUnion
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.concrete.ForumChannel
createCopy, getType
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.concrete.ForumChannelMixin
createCopy
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
getGuild, getJumpUrl
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildChannelMixin
checkCanAccess, checkCanManage, checkPermission, checkPermission, delete, hasPermission
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.GuildChannelUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ICategorizableChannel
getParentCategory, getParentCategoryId, getPositionInCategory
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.ICategorizableChannelMixin
isSynced
Methods inherited from interface net.dv8tion.jda.internal.entities.detached.mixin.IDetachableEntityMixin
checkAttached, detachedException, detachedRequiresChannelException
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IInviteContainerMixin
createInvite, retrieveInvites
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getMemberPermissionOverrides, getRolePermissionOverrides
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IPermissionContainerMixin
getPermissionContainer, getPermissionOverride, getPermissionOverrides, upsertPermissionOverride
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IPermissionContainerUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPositionableChannel
getPosition
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPostContainer
getAvailableTagById, getAvailableTagById, getAvailableTags, getAvailableTagsByName, isTagRequired
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IPostContainerMixin
createForumPost, createThreadChannel, createThreadChannel
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer
getThreadChannels
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IThreadContainerMixin
createThreadChannel, createThreadChannel, retrieveArchivedPrivateJoinedThreadChannels, retrieveArchivedPrivateThreadChannels, retrieveArchivedPublicThreadChannels
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IThreadContainerUnion
asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.attribute.IWebhookContainerMixin
createWebhook, deleteWebhookById, retrieveWebhooks
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IWebhookContainerUnion
asAudioChannel, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadContainer, asVoiceChannel
-
Constructor Details
-
DetachedForumChannelImpl
-
-
Method Details
-
isDetached
public boolean isDetached()Description copied from interface:IDetachableEntity
Whether this entity is detached.If this returns
true
, this entity cannot be retrieved, will never be updated, and most methods that would otherwise return aRestAction
will throw aDetachedEntityException
instead.- Specified by:
isDetached
in interfaceIDetachableEntity
- Returns:
True
, if the entity is detached
-
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 interfaceForumChannel
- Specified by:
getManager
in interfaceGuildChannel
- Specified by:
getManager
in interfaceICategorizableChannel
- Specified by:
getManager
in interfaceIPermissionContainer
- Specified by:
getManager
in interfaceIPositionableChannel
- Specified by:
getManager
in interfaceIPostContainer
- Specified by:
getManager
in interfaceISlowmodeChannel
- Specified by:
getManager
in interfaceStandardGuildChannel
- Returns:
- The ChannelManager of this GuildChannel
- See Also:
-
getMembers
Description copied from interface:IMemberContainer
A List of allMembers
that are in this GuildChannel
ForTextChannels
, this returns all Members with thePermission.VIEW_CHANNEL
Permission.
ForVoiceChannels
, this returns all Members that joined that VoiceChannel.
ForCategories
, this returns all Members who are in its child channels.- Specified by:
getMembers
in interfaceIMemberContainer
- Returns:
- An immutable List of
Members
that are in this GuildChannel.
-
getFlags
Description copied from interface:Channel
The flags configured for this channel.
This feature is currently primarily used forForumChannels
.- Specified by:
getFlags
in interfaceChannel
- Returns:
EnumSet
of the configuredChannelFlags
, changes to this enum set are not reflected in the API.
-
getAvailableTagCache
Description copied from interface:IPostContainer
The availableForumTags
for this forum channel.
Tags are sorted by theirposition
ascending.This requires
CacheFlag.FORUM_TAGS
to be enabled.- Specified by:
getAvailableTagCache
in interfaceIPostContainer
- Specified by:
getAvailableTagCache
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
- Returns:
SortedSnowflakeCacheView
ofForumTag
-
getPermissionOverrideMap
- Specified by:
getPermissionOverrideMap
in interfaceIPermissionContainerMixin<DetachedForumChannelImpl>
-
getInteractionPermissions
- Specified by:
getInteractionPermissions
in interfaceIInteractionPermissionMixin<DetachedForumChannelImpl>
-
isNSFW
public boolean isNSFW()Description copied from interface:IAgeRestrictedChannel
Whether this channel is considered as age-restricted, also known as NSFW (Not-Safe-For-Work)- Specified by:
isNSFW
in interfaceIAgeRestrictedChannel
- Returns:
- True, If this channel is age-restricted by the official Discord Client
-
getPositionRaw
public int getPositionRaw()Description copied from interface:IPositionableChannel
The actual position of theGuildChannel
as stored and given by Discord.Channel positions are actually based on a pairing of the creation time (as stored in the snowflake id) and the position. If 2 or more channels share the same position then they are sorted based on their creation date. The more recent a channel was created, the lower it is in the hierarchy. This is handled by
IPositionableChannel.getPosition()
and it is most likely the method you want. If, for some reason, you want the actual position of the channel then this method will give you that value.- Specified by:
getPositionRaw
in interfaceIPositionableChannel
- Returns:
- The true, Discord stored, position of the
GuildChannel
.
-
getParentCategoryIdLong
public long getParentCategoryIdLong()Description copied from interface:ICategorizableChannel
Get the snowflake of theCategory
that contains this channel.This will return
0
if this channel doesn't have a parent category.- Specified by:
getParentCategoryIdLong
in interfaceICategorizableChannel
- Returns:
- The Discord ID snowflake of the parent channel as a long.
-
getSlowmode
public int getSlowmode()Description copied from interface:ISlowmodeChannel
The slowmode set for this channel.
If slowmode is set, this returns anint
between 1 and 21600.
Otherwise, if no slowmode is set, this returns0
.Note bots are unaffected by this.
HavingMESSAGE_MANAGE
orMANAGE_CHANNEL
permission also grants immunity to slowmode.Special case
ForumChannels
use this to limit how many posts a user can create. The client refers to this as the post slowmode.- Specified by:
getSlowmode
in interfaceISlowmodeChannel
- Returns:
- The slowmode for this channel, between 1 and 21600, or
0
if no slowmode is set.
-
getTopic
Description copied from interface:IPostContainer
The topic set for this channel, this is referred to as Guidelines in the official Discord client.
If no topic has been set, this returns null.- Specified by:
getTopic
in interfaceIPostContainer
- Specified by:
getTopic
in interfaceITopicChannelMixin<DetachedForumChannelImpl>
- Returns:
- Possibly-null String containing the topic of this channel.
-
getDefaultReaction
Description copied from interface:IPostContainer
The emoji which will show up on new forum posts as default reaction.- Specified by:
getDefaultReaction
in interfaceIPostContainer
- Returns:
- The default reaction for new forum posts.
-
getDefaultThreadSlowmode
public int getDefaultThreadSlowmode()Description copied from interface:IThreadContainer
The defaultslowmode
for thread channels that is copied on thread creation.
Users have to wait this amount of seconds before sending another message to the same thread.- Specified by:
getDefaultThreadSlowmode
in interfaceIThreadContainer
- Returns:
- The default slowmode seconds for new threads, or
0
if unset
-
getDefaultSortOrder
Description copied from interface:IPostContainer
The default order used to show threads.- Specified by:
getDefaultSortOrder
in interfaceIPostContainer
- Returns:
- The default order used to show threads.
-
getDefaultLayout
Description copied from interface:ForumChannel
The default layout used to show threads.- Specified by:
getDefaultLayout
in interfaceForumChannel
- Returns:
- The default layout used to show threads.
-
getRawFlags
public int getRawFlags()- Specified by:
getRawFlags
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
-
getRawSortOrder
public int getRawSortOrder()- Specified by:
getRawSortOrder
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
-
getRawLayout
public int getRawLayout() -
setParentCategory
- Specified by:
setParentCategory
in interfaceICategorizableChannelMixin<DetachedForumChannelImpl>
-
setPosition
- Specified by:
setPosition
in interfaceIPositionableChannelMixin<DetachedForumChannelImpl>
-
setDefaultThreadSlowmode
- Specified by:
setDefaultThreadSlowmode
in interfaceIThreadContainerMixin<DetachedForumChannelImpl>
-
setNSFW
- Specified by:
setNSFW
in interfaceIAgeRestrictedChannelMixin<DetachedForumChannelImpl>
-
setSlowmode
- Specified by:
setSlowmode
in interfaceISlowmodeChannelMixin<DetachedForumChannelImpl>
-
setTopic
- Specified by:
setTopic
in interfaceITopicChannelMixin<DetachedForumChannelImpl>
-
setFlags
- Specified by:
setFlags
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
-
setDefaultReaction
- Specified by:
setDefaultReaction
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
-
setDefaultSortOrder
- Specified by:
setDefaultSortOrder
in interfaceIPostContainerMixin<DetachedForumChannelImpl>
-
setDefaultLayout
- Specified by:
setDefaultLayout
in interfaceForumChannelMixin<DetachedForumChannelImpl>
-
setInteractionPermissions
@Nonnull public DetachedForumChannelImpl setInteractionPermissions(@Nonnull ChannelInteractionPermissions interactionPermissions) - Specified by:
setInteractionPermissions
in interfaceIInteractionPermissionMixin<DetachedForumChannelImpl>
-