Table of Contents

Interface IThreadChannel

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a thread channel inside of a guild.

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

Properties

AppliedTags

Gets ids of tags applied to a forum thread

IReadOnlyCollection<ulong> AppliedTags { get; }

Property Value

IReadOnlyCollection<ulong>

Remarks

This property is only available on forum threads.

ArchiveTimestamp

Gets the timestamp when the thread's archive status was last changed, used for calculating recent activity.

DateTimeOffset ArchiveTimestamp { get; }

Property Value

DateTimeOffset

AutoArchiveDuration

Gets the duration of time before the thread is automatically archived after no activity.

ThreadArchiveDuration AutoArchiveDuration { get; }

Property Value

ThreadArchiveDuration

CreatedAt

Gets when the thread was created.

DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Remarks

This property is only populated for threads created after 2022-01-09, hence the default date of this property will be that date.

HasJoined

Gets whether or not the current user has joined this thread.

bool HasJoined { get; }

Property Value

bool

IsArchived

Gets whether or not the current thread is archived.

bool IsArchived { get; }

Property Value

bool

IsInvitable

Gets whether non-moderators can add other non-moderators to a thread.

bool? IsInvitable { get; }

Property Value

bool?

Remarks

This property is only available on private threads.

IsLocked

Gets whether or not the current thread is locked.

bool IsLocked { get; }

Property Value

bool

MemberCount

Gets an approximate count of users in a thread, stops counting after 50.

int MemberCount { get; }

Property Value

int

MessageCount

Gets an approximate count of messages in a thread, stops counting after 50.

int MessageCount { get; }

Property Value

int

OwnerId

Gets the id of the creator of the thread.

ulong OwnerId { get; }

Property Value

ulong

Type

Gets the type of the current thread channel.

ThreadType Type { get; }

Property Value

ThreadType

Methods

AddUserAsync(IGuildUser, RequestOptions)

Adds a user to this thread.

Task AddUserAsync(IGuildUser user, RequestOptions options = null)

Parameters

user IGuildUser

The IGuildUser to add.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous operation of adding a member to a thread.

JoinAsync(RequestOptions)

Joins the current thread.

Task JoinAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous join operation.

LeaveAsync(RequestOptions)

Leaves the current thread.

Task LeaveAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous leave operation.

ModifyAsync(Action<ThreadChannelProperties>, RequestOptions)

Modifies this thread channel.

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

Parameters

func Action<ThreadChannelProperties>

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.

See Also

RemoveUserAsync(IGuildUser, RequestOptions)

Removes a user from this thread.

Task RemoveUserAsync(IGuildUser user, RequestOptions options = null)

Parameters

user IGuildUser

The IGuildUser to remove from this thread.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous operation of removing a user from this thread.