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
DefaultLayout
Gets the rule used to display posts in a forum channel.
ForumLayout DefaultLayout { get; }
Property Value
DefaultReactionEmoji
Gets the emoji to show in the add reaction button on a thread in a forum channel
IEmote DefaultReactionEmoji { get; }
Property Value
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
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
Tags
Gets a collection of tags inside of this forum channel.
IReadOnlyCollection<ForumTag> Tags { get; }
Property Value
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
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
stringThe title of the post.
archiveDuration
ThreadArchiveDurationThe archive duration of the post.
slowmode
int?The slowmode for the posts thread.
text
stringThe message to be sent.
embed
Embedoptions
RequestOptionsThe options to be used when sending the request.
allowedMentions
AllowedMentionsSpecifies if notifications are sent for mentioned users and roles in the message
text
. If null, all mentioned roles and users will be notified.components
MessageComponentThe 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
MessageFlagsA 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
stringThe title of the post.
attachment
FileAttachmentThe attachment containing the file and description.
archiveDuration
ThreadArchiveDurationThe archive duration of the post.
slowmode
int?The slowmode for the posts thread.
text
stringThe message to be sent.
embed
Embedoptions
RequestOptionsThe options to be used when sending the request.
allowedMentions
AllowedMentionsSpecifies if notifications are sent for mentioned users and roles in the message
text
. If null, all mentioned roles and users will be notified.components
MessageComponentThe 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
MessageFlagsA 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
stringThe title of the post.
stream
StreamThe Stream of the file to be sent.
filename
stringThe name of the attachment.
archiveDuration
ThreadArchiveDurationThe archive duration of the post.
slowmode
int?The slowmode for the posts thread.
text
stringThe message to be sent.
embed
Embedoptions
RequestOptionsThe options to be used when sending the request.
isSpoiler
boolWhether the message attachment should be hidden as a spoiler.
allowedMentions
AllowedMentionsSpecifies if notifications are sent for mentioned users and roles in the message
text
. If null, all mentioned roles and users will be notified.components
MessageComponentThe 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
MessageFlagsA 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
stringThe title of the post.
filePath
stringThe file path of the file.
archiveDuration
ThreadArchiveDurationThe archive duration of the post.
slowmode
int?The slowmode for the posts thread.
text
stringThe message to be sent.
embed
Embedoptions
RequestOptionsThe options to be used when sending the request.
isSpoiler
boolWhether the message attachment should be hidden as a spoiler.
allowedMentions
AllowedMentionsSpecifies if notifications are sent for mentioned users and roles in the message
text
. If null, all mentioned roles and users will be notified.components
MessageComponentThe 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
MessageFlagsA 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
stringThe title of the post.
attachments
IEnumerable<FileAttachment>A collection of attachments to upload.
archiveDuration
ThreadArchiveDurationThe archive duration of the post.
slowmode
int?The slowmode for the posts thread.
text
stringThe message to be sent.
embed
Embedoptions
RequestOptionsThe options to be used when sending the request.
allowedMentions
AllowedMentionsSpecifies if notifications are sent for mentioned users and roles in the message
text
. If null, all mentioned roles and users will be notified.components
MessageComponentThe 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
MessageFlagsA 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
RequestOptionsThe 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
RequestOptionsThe 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
RequestOptionsThe 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
RequestOptionsThe 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
RequestOptionsThe 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.