You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

ThreadsAPI

export declare class ThreadsAPI
export declare class ThreadsAPI

No summary provided.

constructor(rest)
Constructs a new instance of the ThreadsAPI class
NameTypeOptionalDescription
restRESTNoNone
addMember(threadId, userId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to add the member to
userIdSnowflakeNoThe id of the user to add to the thread
optionsPick<RequestData, 'signal'>YesThe options for adding the member to the thread
getAllMembers(threadId, options?):Promise<RESTGetAPIChannelThreadMembersResult>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the members from
optionsPick<RequestData, 'signal'>YesThe options for fetching the members
getMember(threadId, userId, options?):Promise<APIThreadMember>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the member from
userIdSnowflakeNoThe id of the user
optionsPick<RequestData, 'signal'>YesThe options for fetching the member
join(threadId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to join
optionsPick<RequestData, 'signal'>YesThe options for joining the thread
leave(threadId, options?):Promise<void>
Removes the current user from a thread
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to leave
optionsPick<RequestData, 'signal'>YesThe options for leaving the thread
removeMember(threadId, userId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to remove the member from
userIdSnowflakeNoThe id of the user to remove from the thread
optionsPick<RequestData, 'signal'>YesThe options for removing the member from the thread