Interface IThreadChannel
Represents a thread channel inside of a guild.
Assembly: Discord.Net.Core.dll​
View Source​
public interface IThreadChannel : ITextChannel, IMessageChannel, IMentionable, INestedChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties​
Type​
Gets the type of the current thread channel.
View Source​
ThreadType Type { get; }
HasJoined​
Gets whether or not the current user has joined this thread.
View Source​
bool HasJoined { get; }
IsArchived​
Gets whether or not the current thread is archived.
View Source​
bool IsArchived { get; }
AutoArchiveDuration​
Gets the duration of time before the thread is automatically archived after no activity.
View Source​
ThreadArchiveDuration AutoArchiveDuration { get; }
ArchiveTimestamp​
Gets the timestamp when the thread's archive status was last changed, used for calculating recent activity.
View Source​
DateTimeOffset ArchiveTimestamp { get; }
IsLocked​
Gets whether or not the current thread is locked.
View Source​
bool IsLocked { get; }
MemberCount​
Gets an approximate count of users in a thread, stops counting after 50.
View Source​
int MemberCount { get; }
MessageCount​
Gets an approximate count of messages in a thread, stops counting after 50.
View Source​
int MessageCount { get; }
Methods​
JoinAsync(RequestOptions)​
Joins the current thread.
View Source​
Task JoinAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous join operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
LeaveAsync(RequestOptions)​
Leaves the current thread.
View Source​
Task LeaveAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous leave operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
AddUserAsync(IGuildUser, RequestOptions)​
Adds a user to this thread.
View Source​
Task AddUserAsync(IGuildUser user, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous operation of adding a member to a thread.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IGuildUser | user | The Discord.IGuildUser to add. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveUserAsync(IGuildUser, RequestOptions)​
Removes a user from this thread.
View Source​
Task RemoveUserAsync(IGuildUser user, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous operation of removing a user from this thread.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IGuildUser | user | The Discord.IGuildUser to remove from this thread. |
Discord.RequestOptions | options | The options to be used when sending the request. |