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
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
AutoArchiveDuration
Gets the duration of time before the thread is automatically archived after no activity.
ThreadArchiveDuration AutoArchiveDuration { get; }
Property Value
CreatedAt
Gets when the thread was created.
DateTimeOffset CreatedAt { get; }
Property Value
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
IsArchived
Gets whether or not the current thread is archived.
bool IsArchived { get; }
Property Value
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
MemberCount
Gets an approximate count of users in a thread, stops counting after 50.
int MemberCount { get; }
Property Value
MessageCount
Gets an approximate count of messages in a thread, stops counting after 50.
int MessageCount { get; }
Property Value
OwnerId
Gets the id of the creator of the thread.
ulong OwnerId { get; }
Property Value
Type
Gets the type of the current thread channel.
ThreadType Type { get; }
Property Value
Methods
AddUserAsync(IGuildUser, RequestOptions)
Adds a user to this thread.
Task AddUserAsync(IGuildUser user, RequestOptions options = null)
Parameters
user
IGuildUserThe IGuildUser to add.
options
RequestOptionsThe 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
RequestOptionsThe 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
RequestOptionsThe 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
RequestOptionsThe 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
IGuildUserThe IGuildUser to remove from this thread.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation of removing a user from this thread.