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 to use when adding the member to the thread
create(channelId, body, messageId?, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to start the thread in
bodyRESTPostAPIChannelThreadsJSONBodyNoThe data to use when starting the thread
messageIdSnowflakeYesThe id of the message to start the thread from
optionsPick<RequestData, 'signal'>YesThe options to use when starting the thread
createForumThread(channelId, body, options?):Promise<APIThreadChannel>
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the forum channel to start the thread in
bodyStartForumThreadOptionsNoThe data to use when starting the thread
optionsPick<RequestData, 'signal'>YesThe options to use when starting the thread
get(threadId, options?):Promise<APIThreadChannel>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread
optionsPick<RequestData, 'signal'>YesThe options to use when fetching the thread
getAllMembers(threadId, options?):Promise<RESTGetAPIChannelThreadMembersResult>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the members from
optionsPick<RequestData, 'signal'>YesThe options to use when 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 to use when fetching the member
join(threadId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to join
optionsPick<RequestData, 'signal'>YesThe options to use when 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 to use when 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 to use when removing the member from the thread