Table of Contents

Interface IForumChannel

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a forum channel in a guild that can create posts.

public interface IForumChannel : IMentionable, INestedChannel, IIntegrationChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable
Inherited Members
Extension Methods

Properties

DefaultAutoArchiveDuration

Gets the default archive duration for a newly created post.

ThreadArchiveDuration DefaultAutoArchiveDuration { get; }

Property Value

ThreadArchiveDuration

DefaultLayout

Gets the rule used to display posts in a forum channel.

ForumLayout DefaultLayout { get; }

Property Value

ForumLayout

DefaultReactionEmoji

Gets the emoji to show in the add reaction button on a thread in a forum channel

IEmote DefaultReactionEmoji { get; }

Property Value

IEmote

Remarks

If the emoji is Emote only the Id will be populated. Use GetEmoteAsync(ulong, RequestOptions) to get the emoji.

DefaultSlowModeInterval

Gets the current default slow-mode delay for threads in this forum channel.

int DefaultSlowModeInterval { get; }

Property Value

int

An int representing the time in seconds required before the user can send another message; 0 if disabled.

DefaultSortOrder

Gets the rule used to order posts in forum channels.

ForumSortOrder? DefaultSortOrder { get; }

Property Value

ForumSortOrder?

Remarks

Defaults to null, which indicates a preferred sort order hasn't been set

IsNsfw

Gets a value that indicates whether the channel is NSFW.

bool IsNsfw { get; }

Property Value

bool

true if the channel has the NSFW flag enabled; otherwise false.

Tags

Gets a collection of tags inside of this forum channel.

IReadOnlyCollection<ForumTag> Tags { get; }

Property Value

IReadOnlyCollection<ForumTag>

ThreadCreationInterval

Gets the current rate limit on creating posts in this forum channel.

int ThreadCreationInterval { get; }

Property Value

int

An int representing the time in seconds required before the user can send another message; 0 if disabled.

Topic

Gets the current topic for this text channel.

string Topic { get; }

Property Value

string

A string representing the topic set in the channel; null if none is set.

Methods

CreatePostAsync(string, ThreadArchiveDuration, int?, string, Embed, RequestOptions, AllowedMentions, MessageComponent, ISticker[], Embed[], MessageFlags, ForumTag[])

Creates a new post (thread) within the forum.

Task<IThreadChannel> CreatePostAsync(string title, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None, ForumTag[] tags = null)

Parameters

title string

The title of the post.

archiveDuration ThreadArchiveDuration

The archive duration of the post.

slowmode int?

The slowmode for the posts thread.

text string

The message to be sent.

embed Embed

The RichEmbed to be sent.

options RequestOptions

The options to be used when sending the request.

allowedMentions AllowedMentions

Specifies if notifications are sent for mentioned users and roles in the message text. If null, all mentioned roles and users will be notified.

components MessageComponent

The message components to be included with this message. Used for interactions.

stickers ISticker[]

A collection of stickers to send with the message.

embeds Embed[]

A array of Embeds to send with this response. Max 10.

flags MessageFlags

A message flag to be applied to the sent message, only SuppressEmbeds is permitted.

tags ForumTag[]

An array of ForumTag to be applied to the post.

Returns

Task<IThreadChannel>

A task that represents the asynchronous creation operation.

CreatePostWithFileAsync(string, FileAttachment, ThreadArchiveDuration, int?, string, Embed, RequestOptions, AllowedMentions, MessageComponent, ISticker[], Embed[], MessageFlags, ForumTag[])

Creates a new post (thread) within the forum.

Task<IThreadChannel> CreatePostWithFileAsync(string title, FileAttachment attachment, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None, ForumTag[] tags = null)

Parameters

title string

The title of the post.

attachment FileAttachment

The attachment containing the file and description.

archiveDuration ThreadArchiveDuration

The archive duration of the post.

slowmode int?

The slowmode for the posts thread.

text string

The message to be sent.

embed Embed

The RichEmbed to be sent.

options RequestOptions

The options to be used when sending the request.

allowedMentions AllowedMentions

Specifies if notifications are sent for mentioned users and roles in the message text. If null, all mentioned roles and users will be notified.

components MessageComponent

The message components to be included with this message. Used for interactions.

stickers ISticker[]

A collection of stickers to send with the file.

embeds Embed[]

A array of Embeds to send with this response. Max 10.

flags MessageFlags

A message flag to be applied to the sent message, only SuppressEmbeds is permitted.

tags ForumTag[]

An array of ForumTag to be applied to the post.

Returns

Task<IThreadChannel>

A task that represents the asynchronous creation operation.

CreatePostWithFileAsync(string, Stream, string, ThreadArchiveDuration, int?, string, Embed, RequestOptions, bool, AllowedMentions, MessageComponent, ISticker[], Embed[], MessageFlags, ForumTag[])

Creates a new post (thread) within the forum.

Task<IThreadChannel> CreatePostWithFileAsync(string title, Stream stream, string filename, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None, ForumTag[] tags = null)

Parameters

title string

The title of the post.

stream Stream

The Stream of the file to be sent.

filename string

The name of the attachment.

archiveDuration ThreadArchiveDuration

The archive duration of the post.

slowmode int?

The slowmode for the posts thread.

text string

The message to be sent.

embed Embed

The RichEmbed to be sent.

options RequestOptions

The options to be used when sending the request.

isSpoiler bool

Whether the message attachment should be hidden as a spoiler.

allowedMentions AllowedMentions

Specifies if notifications are sent for mentioned users and roles in the message text. If null, all mentioned roles and users will be notified.

components MessageComponent

The message components to be included with this message. Used for interactions.

stickers ISticker[]

A collection of stickers to send with the file.

embeds Embed[]

A array of Embeds to send with this response. Max 10.

flags MessageFlags

A message flag to be applied to the sent message, only SuppressEmbeds is permitted.

tags ForumTag[]

An array of ForumTag to be applied to the post.

Returns

Task<IThreadChannel>

A task that represents the asynchronous creation operation.

CreatePostWithFileAsync(string, string, ThreadArchiveDuration, int?, string, Embed, RequestOptions, bool, AllowedMentions, MessageComponent, ISticker[], Embed[], MessageFlags, ForumTag[])

Creates a new post (thread) within the forum.

Task<IThreadChannel> CreatePostWithFileAsync(string title, string filePath, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None, ForumTag[] tags = null)

Parameters

title string

The title of the post.

filePath string

The file path of the file.

archiveDuration ThreadArchiveDuration

The archive duration of the post.

slowmode int?

The slowmode for the posts thread.

text string

The message to be sent.

embed Embed

The RichEmbed to be sent.

options RequestOptions

The options to be used when sending the request.

isSpoiler bool

Whether the message attachment should be hidden as a spoiler.

allowedMentions AllowedMentions

Specifies if notifications are sent for mentioned users and roles in the message text. If null, all mentioned roles and users will be notified.

components MessageComponent

The message components to be included with this message. Used for interactions.

stickers ISticker[]

A collection of stickers to send with the file.

embeds Embed[]

A array of Embeds to send with this response. Max 10.

flags MessageFlags

A message flag to be applied to the sent message, only SuppressEmbeds is permitted.

tags ForumTag[]

An array of ForumTag to be applied to the post.

Returns

Task<IThreadChannel>

A task that represents the asynchronous creation operation.

CreatePostWithFilesAsync(string, IEnumerable<FileAttachment>, ThreadArchiveDuration, int?, string, Embed, RequestOptions, AllowedMentions, MessageComponent, ISticker[], Embed[], MessageFlags, ForumTag[])

Creates a new post (thread) within the forum.

Task<IThreadChannel> CreatePostWithFilesAsync(string title, IEnumerable<FileAttachment> attachments, ThreadArchiveDuration archiveDuration = ThreadArchiveDuration.OneDay, int? slowmode = null, string text = null, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None, ForumTag[] tags = null)

Parameters

title string

The title of the post.

attachments IEnumerable<FileAttachment>

A collection of attachments to upload.

archiveDuration ThreadArchiveDuration

The archive duration of the post.

slowmode int?

The slowmode for the posts thread.

text string

The message to be sent.

embed Embed

The RichEmbed to be sent.

options RequestOptions

The options to be used when sending the request.

allowedMentions AllowedMentions

Specifies if notifications are sent for mentioned users and roles in the message text. If null, all mentioned roles and users will be notified.

components MessageComponent

The message components to be included with this message. Used for interactions.

stickers ISticker[]

A collection of stickers to send with the file.

embeds Embed[]

An array of Embeds to send with this response. Max 10.

flags MessageFlags

A message flag to be applied to the sent message, only SuppressEmbeds is permitted.

tags ForumTag[]

An array of ForumTag to be applied to the post.

Returns

Task<IThreadChannel>

A task that represents the asynchronous creation operation.

GetActiveThreadsAsync(RequestOptions)

Gets a collection of active threads within this forum channel.

Task<IReadOnlyCollection<IThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task<IReadOnlyCollection<IThreadChannel>>

A task that represents an asynchronous get operation for retrieving the threads. The task result contains a collection of active threads.

GetJoinedPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)

Gets a collection of privately archived threads that the current bot has joined within this forum channel.

Task<IReadOnlyCollection<IThreadChannel>> GetJoinedPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null)

Parameters

limit int?

The optional limit of how many to get.

before DateTimeOffset?

The optional date to return threads created before this timestamp.

options RequestOptions

The options to be used when sending the request.

Returns

Task<IReadOnlyCollection<IThreadChannel>>

A task that represents an asynchronous get operation for retrieving the threads. The task result contains a collection of privately archived threads.

GetPrivateArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)

Gets a collection of privately archived threads within this forum channel.

Task<IReadOnlyCollection<IThreadChannel>> GetPrivateArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null)

Parameters

limit int?

The optional limit of how many to get.

before DateTimeOffset?

The optional date to return threads created before this timestamp.

options RequestOptions

The options to be used when sending the request.

Returns

Task<IReadOnlyCollection<IThreadChannel>>

A task that represents an asynchronous get operation for retrieving the threads. The task result contains a collection of privately archived threads.

Remarks

The bot requires the ManageThreads permission in order to execute this request.

GetPublicArchivedThreadsAsync(int?, DateTimeOffset?, RequestOptions)

Gets a collection of publicly archived threads within this forum channel.

Task<IReadOnlyCollection<IThreadChannel>> GetPublicArchivedThreadsAsync(int? limit = null, DateTimeOffset? before = null, RequestOptions options = null)

Parameters

limit int?

The optional limit of how many to get.

before DateTimeOffset?

The optional date to return threads created before this timestamp.

options RequestOptions

The options to be used when sending the request.

Returns

Task<IReadOnlyCollection<IThreadChannel>>

A task that represents an asynchronous get operation for retrieving the threads. The task result contains a collection of publicly archived threads.

ModifyAsync(Action<ForumChannelProperties>, RequestOptions)

Modifies this forum channel.

Task ModifyAsync(Action<ForumChannelProperties> func, RequestOptions options = null)

Parameters

func Action<ForumChannelProperties>

The delegate containing the properties to modify the channel with.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous modification operation.

Remarks

This method modifies the current forum channel with the specified properties. To see an example of this method and what properties are available, please refer to ForumChannelProperties.