Represents a thread channel on Discord.
Extends
BaseChannelThe 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
The flags that are applied to the channel. This is only
null
in a PartialGroupDMChannel. In all other cases, it is not null
.The channel's id
Inherited from BaseChannelWhether members without the PermissionFlagsBits.ManageThreads 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
Whether this Channel is a partial This is always false outside of DM channels.
Inherited from BaseChannelThe number of messages ever sent in a thread, similar to except it will not decrement whenever a message is deleted
The URL to the channel
Inherited from BaseChannelCollects a single component interaction that passes the filter. The Promise will reject if the time expires.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | AwaitMessageComponentOptions | Yes | Options to pass to the internal collector |
Similar to createMessageCollector but in promise form. Resolves with a collection of messages that pass the specified filter.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | AwaitMessagesOptions | Yes | Optional options to pass to the internal collector |
Bulk deletes given messages that are newer than two weeks.
Returns
Returns the deleted messages *Example
Name | Type | Optional | Description |
---|---|---|---|
messages | Collection<Snowflake, Message> | Array<MessageResolvable> | number | No | Messages or number of messages to delete |
filterOld | boolean | Yes | Filter messages to remove those which are older than two weeks automatically |
Creates a Message Collector.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | MessageCollectorOptions | Yes | The options to pass to the collector |
Creates a component interaction collector.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | MessageComponentCollectorOptions | Yes | Options to send to the collector |
Deletes this thread.
Example
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for deleting this thread |
Edits this thread.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | ThreadEditOptions | No | The options to provide |
Fetches this channel.
Name | Type | Optional | Description |
---|---|---|---|
force | boolean | Yes | Whether to skip the cache check and request the API |
Fetches the owner of this thread. If the thread member object isn't needed, use 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 id instead.Name | Type | Optional | Description |
---|---|---|---|
options | BaseFetchOptions | Yes | Additional options for this fetch |
Indicates whether this channel is DM-based (either a or a PartialGroupDMChannel).
Inherited from BaseChannelIndicates whether this channel is sendable.
Inherited from BaseChannelIndicates whether this channel is text-based.
Inherited from BaseChannelIndicates whether this channel is a .
Inherited from BaseChannelIndicates whether this channel is .
Inherited from BaseChannelIndicates whether this channel is .
Inherited from BaseChannelMakes 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 PermissionFlagsBits.Administrator 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 |
Sends a message to this channel.
Example
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
options | string | MessagePayload | MessageCreateOptions | No | The options to provide |
Sends a typing indicator in the channel.
Returns
Resolves upon the typing status being sent *Example
Set the applied tags for this channel (only applicable to forum threads)
Sets whether the thread is archived.
Example
Sets the duration after which the thread will automatically archive in case of no recent activity.
Example
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 PermissionFlagsBits.ManageThreads permission can invite other members to this thread.
Sets whether the thread can be **unarchived* * by anyone with the PermissionFlagsBits.SendMessages permission. When a thread is locked, only members with the PermissionFlagsBits.ManageThreads permission can unarchive it.
Example
Sets a new name for this thread.
Example
Sets the rate limit per user (slowmode) for this thread.
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
Example
Unpins this thread from the forum channel (only applicable to forum threads).
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for unpinning |