Interface IThreadChannel
Represents a thread channel inside of a guild.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface IThreadChannel : ITextChannel, IMessageChannel, IMentionable, INestedChannel, IIntegrationChannel, IGuildChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties
| Improve this Doc View SourceAppliedTags
Gets ids of tags applied to a forum thread
Declaration
IReadOnlyCollection<ulong> AppliedTags { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<UInt64> |
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.
Declaration
DateTimeOffset ArchiveTimestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
AutoArchiveDuration
Gets the duration of time before the thread is automatically archived after no activity.
Declaration
ThreadArchiveDuration AutoArchiveDuration { get; }
Property Value
Type | Description |
---|---|
ThreadArchiveDuration |
CreatedAt
Gets when the thread was created.
Declaration
DateTimeOffset CreatedAt { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
bool HasJoined { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsArchived
Gets whether or not the current thread is archived.
Declaration
bool IsArchived { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsInvitable
Gets whether non-moderators can add other non-moderators to a thread.
Declaration
bool? IsInvitable { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Remarks
This property is only available on private threads.
IsLocked
Gets whether or not the current thread is locked.
Declaration
bool IsLocked { get; }
Property Value
Type | Description |
---|---|
Boolean |
MemberCount
Gets an approximate count of users in a thread, stops counting after 50.
Declaration
int MemberCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
MessageCount
Gets an approximate count of messages in a thread, stops counting after 50.
Declaration
int MessageCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
OwnerId
Gets the id of the creator of the thread.
Declaration
ulong OwnerId { get; }
Property Value
Type | Description |
---|---|
UInt64 |
Type
Gets the type of the current thread channel.
Declaration
ThreadType Type { get; }
Property Value
Type | Description |
---|---|
ThreadType |
Methods
| Improve this Doc View SourceAddUserAsync(IGuildUser, RequestOptions)
Adds a user to this thread.
Declaration
Task AddUserAsync(IGuildUser user, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IGuildUser | user | The IGuildUser to add. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation of adding a member to a thread. |
JoinAsync(RequestOptions)
Joins the current thread.
Declaration
Task JoinAsync(RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous join operation. |
LeaveAsync(RequestOptions)
Leaves the current thread.
Declaration
Task LeaveAsync(RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous leave operation. |
ModifyAsync(Action<ThreadChannelProperties>, RequestOptions)
Modifies this thread channel.
Declaration
Task ModifyAsync(Action<ThreadChannelProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<ThreadChannelProperties> | func | The delegate containing the properties to modify the channel with. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |
See Also
| Improve this Doc View SourceRemoveUserAsync(IGuildUser, RequestOptions)
Removes a user from this thread.
Declaration
Task RemoveUserAsync(IGuildUser user, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IGuildUser | user | The IGuildUser to remove from this thread. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation of removing a user from this thread. |