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
threadIdSnowflakeNo
The id of the thread to add the member to
userIdSnowflakeNo
The id of the user to add to the thread
optionsPick<RequestData, 'signal'>Yes
The options to use when adding the member to the thread
create(channelId, body, messageId?, options?):Promise<APIChannel>
NameTypeOptionalDescription
channelIdSnowflakeNo
The id of the channel to start the thread in
bodyRESTPostAPIChannelThreadsJSONBodyNo
The data to use when starting the thread
messageIdSnowflakeYes
The id of the message to start the thread from
optionsPick<RequestData, 'signal'>Yes
The options to use when starting the thread
createForumThread(channelId, body, options?):Promise<APIThreadChannel>
NameTypeOptionalDescription
channelIdSnowflakeNo
The id of the forum channel to start the thread in
bodyStartForumThreadOptionsNo
The data to use when starting the thread
optionsPick<RequestData, 'signal'>Yes
The options to use when starting the thread
get(threadId, options?):Promise<APIThreadChannel>
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread
optionsPick<RequestData, 'signal'>Yes
The options to use when fetching the thread
getAllMembers(threadId, options?):Promise<RESTGetAPIChannelThreadMembersResult>
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread to fetch the members from
optionsPick<RequestData, 'signal'>Yes
The options to use when fetching the members
getMember(threadId, userId, options?):Promise<APIThreadMember>
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread to fetch the member from
userIdSnowflakeNo
The id of the user
optionsPick<RequestData, 'signal'>Yes
The options to use when fetching the member
join(threadId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread to join
optionsPick<RequestData, 'signal'>Yes
The options to use when joining the thread
leave(threadId, options?):Promise<void>
Removes the current user from a thread
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread to leave
optionsPick<RequestData, 'signal'>Yes
The options to use when leaving the thread
removeMember(threadId, userId, options?):Promise<void>
NameTypeOptionalDescription
threadIdSnowflakeNo
The id of the thread to remove the member from
userIdSnowflakeNo
The id of the user to remove from the thread
optionsPick<RequestData, 'signal'>Yes
The options to use when removing the member from the thread