Represents a thread channel on Discord.
Extends
TextBasedChannelMixin(BaseChannel, true, [ 'fetchWebhooks', 'createWebhook', 'setNSFW', ])Name | Constraints | Optional | Default | Description |
---|---|---|---|---|
ThreadOnly | boolean | Yes | boolean | None |
The time at which this thread's archive status was last changed If the thread was never archived or unarchived, this is the time at which the thread was created
The timestamp when the thread's archive status was last changed If the thread was never archived or unarchived, this is the timestamp at which the thread was created
The amount of time (in minutes) after which the thread will automatically archive in case of no recent activity
The timestamp when this thread was created. This isn't available for threads created before 2022-01-09
Whether the thread is editable by the client user (name, archived, autoArchiveDuration)
The flags that are applied to the channel. This is only
null
in a PartialGroupDMChannel. In all other cases, it is not null
.Whether members without the permission can invite other members to this thread. This property is always
null
in public threads.Whether the thread is manageable by the client user, for deleting or editing rateLimitPerUser or locked.
The approximate count of users in this thread This stops counting at 50. If you need an approximate value higher than that, use
ThreadChannel#members.cache.size
The approximate count of messages in this thread Threads created before July 1, 2022 may have an inaccurate count. If you need an approximate value higher than that, use
ThreadChannel#messages.cache.size
The number of messages ever sent in a thread, similar to messageCount except it will not decrement whenever a message is deleted
Deletes this thread.
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for deleting this thread |
Edits this thread.
Name | Type | Optional | Description |
---|---|---|---|
options | ThreadEditOptions | No | The options to provide |
Fetches the owner of this thread. If the thread member object isn't needed, use ownerId instead.
Name | Type | Optional | Description |
---|---|---|---|
options | BaseFetchOptions | Yes | The options for fetching the member |
Fetches the message that started this thread, if any. The
Promise
will reject if the original message in a forum post is deleted or when the original message in the parent channel is deleted. If you just need the id of that message, use instead.Name | Type | Optional | Description |
---|---|---|---|
options | BaseFetchOptions | Yes | Additional options for this fetch |
Makes the client user join the thread.
Makes the client user leave the thread.
Gets the overall set of permissions for a member or role in this thread's parent channel, taking overwrites into account.
Returns
Name | Type | Optional | Description |
---|---|---|---|
memberOrRole | GuildMember | Role | No | The member or role to obtain the overall permissions for |
checkAdmin | boolean | Yes | Whether having the permission will return all permissions |
Pins this thread from the forum channel (only applicable to forum threads).
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for pinning |
Set the applied tags for this channel (only applicable to forum threads)
Name | Type | Optional | Description |
---|---|---|---|
appliedTags | Snowflake[] | No | The tags to set for this channel |
reason | string | Yes | Reason for changing the thread's applied tags |
Sets whether the thread is archived.
Name | Type | Optional | Description |
---|---|---|---|
archived | boolean | Yes | Whether the thread is archived |
reason | string | Yes | Reason for archiving or unarchiving |
Sets the duration after which the thread will automatically archive in case of no recent activity.
Name | Type | Optional | Description |
---|---|---|---|
autoArchiveDuration | ThreadAutoArchiveDuration | No | The amount of time after which the thread should automatically archive in case of no recent activity |
reason | string | Yes | Reason for changing the auto archive duration |
Sets whether members without the permission can invite other members to this thread.
Name | Type | Optional | Description |
---|---|---|---|
invitable | boolean | Yes | Whether non-moderators can invite non-moderators to this thread |
reason | string | Yes | Reason for changing invite |
Sets whether the thread can be **unarchived** by anyone with the permission. When a thread is locked, only members with the permission can unarchive it.
Name | Type | Optional | Description |
---|---|---|---|
locked | boolean | Yes | Whether the thread is locked |
reason | string | Yes | Reason for locking or unlocking the thread |
Sets a new name for this thread.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The new name for the thread |
reason | string | Yes | Reason for changing the thread's name |
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
Unpins this thread from the forum channel (only applicable to forum threads).
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for unpinning |