Skip to main content
A ThreadChannel is a thread, or a post of a forum. It is what channel.isThread() gives, and what message.startThread(), channel.startThread() and forum.createPost() return.
How to send, edit and read messages is in Sending messages.

Properties

It also has everything of Channel and what channels with messages share. A thread is not a GuildChannel: it has no overwrites of its own, and takes the permissions of the channel it is in.
Snowflake
The id of the server of the thread.
Guild
The server of the thread.
string
The name of the thread.
Snowflake
The id of the channel the thread was created in.
TextChannel | ForumChannel | null
The channel the thread was created in; null when it is of a kind this version does not know.
Snowflake | null
The id of the user who created the thread.
boolean
Whether the thread is archived.
boolean
Whether only moderators can unarchive it.
boolean
Whether only invited members and moderators can see it.
Date | null
When the thread was archived or unarchived for the last time.
number
An approximate count of the members of the thread (stops at 50).
readonly Snowflake[]
The ids of the tags of the post, in a forum.

Helpers

permissionsFor()

Threads inherit the permissions of the channel they are in.

Reading from Discord

fetchMembers()

Who is in the thread (100 at most per call). Each entry is a ThreadMember. Discord documentation

Actions

edit()

Changes the thread: name, archive, lock, slowmode, tags. The options are a ThreadEditOptions. Discord documentation

archive()

Archives the thread: it leaves the channel list but can come back. Discord documentation

unarchive()

Brings an archived thread back. Discord documentation

join()

Makes the bot join the thread. Discord documentation

leave()

Makes the bot leave the thread. Discord documentation

addMember()

Adds a member to the thread. Discord documentation

removeMember()

Removes a member from the thread. Discord documentation