Class ForumChannel
java.lang.Object
discord4j.core.object.entity.channel.ForumChannel
- All Implemented Interfaces:
DiscordObject
,CategorizableChannel
,Channel
,GuildChannel
,TopLevelGuildChannel
,Entity
A Discord guild channel that contains organized threads with labels.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Layout types are used by Forum channels to organize their threads channel into a user viewstatic enum
Sort orders are proposed by Discord to choose the order or threads in a Forum channel
Please see Discord documentation for further detailsNested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Flag, Channel.Type
-
Constructor Summary
ConstructorDescriptionForumChannel
(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data) -
Method Summary
Modifier and TypeMethodDescriptionedit
(discord4j.core.spec.ForumChannelEditSpec spec) Requests to edit the current forum channel objectfinal boolean
Gets the available forum tags for this forum channelfinal GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.final discord4j.discordjson.json.ChannelData
getData()
Gets the raw data as represented by Discord.Gets the default auto archive duration for threads in this forum channelGets the associatedForumChannel.LayoutType
for this Forum channelGets the default emoji to add in a reaction button on a thread for this forum channelGets the default thread rate limit duration per user.getEffectivePermissions
(Snowflake memberId) Gets the permissions for the given member, taking into account permission overwrites in this channel.getEffectivePermissions
(Member member) Gets the permissions for the given member, taking into account permission overwrites in this channel.getFlags()
Gets the channelsChannel.Flag
associated to this forum channel Unknown flags are currently ignored.final RestChannel
Return aRestChannel
handle to execute REST API operations on this entity.Gets the default associatedForumChannel.SortOrder
for this forum channelgetTopic()
Gets the topic for this guild forum.final int
hashCode()
boolean
isNsfw()
Gets whether this channel is considered NSFW (Not Safe For Work).startThread
(discord4j.core.spec.StartThreadInForumChannelSpec request) Starts a newThreadChannel
in this forum channeltoString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface discord4j.core.object.entity.channel.CategorizableChannel
createInvite, createInvite, createInvite, getCategory, getCategory, getCategoryId, getInvites, getRateLimitPerUser
Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, delete, getData, getId, getMention, getRestChannel, getType
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
Methods inherited from interface discord4j.core.object.entity.channel.GuildChannel
getEffectivePermissions, getEffectivePermissions, getGuild, getGuild, getGuildId, getName
Methods inherited from interface discord4j.core.object.entity.channel.TopLevelGuildChannel
addMemberOverwrite, addMemberOverwrite, addRoleOverwrite, addRoleOverwrite, getOverwriteForMember, getOverwriteForRole, getPermissionOverwrites, getPosition, getRawPosition
-
Constructor Details
-
ForumChannel
-
-
Method Details
-
getTopic
Gets the topic for this guild forum.- Returns:
- the user defined topic for this guild forum channel (0-4096 characters).
-
isNsfw
public boolean isNsfw()Gets whether this channel is considered NSFW (Not Safe For Work).- Returns:
true
if this channel is considered NSFW (Not Safe For Work),false
otherwise.
-
getFlags
Gets the channelsChannel.Flag
associated to this forum channel Unknown flags are currently ignored.- Returns:
- An
EnumSet
representing the known flags for this forum channel.
-
getDefaultAutoArchiveDuration
Gets the default auto archive duration for threads in this forum channel- Returns:
- Default client auto archive duration in minutes wrapped in an
Optional
object
-
getAvailableTags
Gets the available forum tags for this forum channel- Returns:
- A list containing every available forum tag for this channel
-
getDefaultReaction
Gets the default emoji to add in a reaction button on a thread for this forum channel- Returns:
- An
Optional
that may contain theDefaultReaction
emoji
-
getDefaultThreadRateLimitPerUser
Gets the default thread rate limit duration per user. This field is copied into a created thread and is not updated on the fly.- Returns:
- The initial rate limit per user for newly created threads
-
getSortOrder
Gets the default associatedForumChannel.SortOrder
for this forum channel- Returns:
- The
ForumChannel.SortOrder
, wrapped in anOptional
-
getDefaultForumLayout
Gets the associatedForumChannel.LayoutType
for this Forum channel- Returns:
- The associated
ForumChannel.LayoutType
-
startThread
Starts a newThreadChannel
in this forum channel- Parameters:
request
- an immutable object that specifies how to create the thread- Returns:
- A
Mono
that, upon completion, emits aThreadChannel
object
-
edit
Requests to edit the current forum channel object- Parameters:
spec
- an immutable object that specifies the modifications requested- Returns:
- A
Mono
that, upon completion, emits the updatedForumChannel
object
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
memberId
- The ID of the member to get permissions for.- Returns:
- The permissions for the given member.
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
member
- The member to get permissions for.- Returns:
- The permissions for the given member.
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getRestChannel
Description copied from interface:Channel
Return aRestChannel
handle to execute REST API operations on this entity.- Specified by:
getRestChannel
in interfaceChannel
-
getData
public final discord4j.discordjson.json.ChannelData getData()Description copied from interface:Channel
Gets the raw data as represented by Discord. -
equals
-
hashCode
public final int hashCode() -
toString
-