Search...

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, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to add the member to
userIdSnowflakeNoThe id of the user to add to the thread
{ signal }Pick<RequestData, 'signal'>YesNone

create(channelId, body, messageId?, { signal }?)

:

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
{ signal }Pick<RequestData, 'signal'>YesNone

createForumThread(channelId, { message, ...optionsBody }, { signal }?)

:

Promise<APIThreadChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the forum channel to start the thread in
{ message, ...optionsBody }StartForumThreadOptionsNoNone
{ signal }Pick<RequestData, 'signal'>YesNone

get(threadId, { signal }?)

:

Promise<APIThreadChannel>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread
{ signal }Pick<RequestData, 'signal'>YesNone

getAllMembers(threadId, { signal }?)

:

Promise<RESTGetAPIChannelThreadMembersResult>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the members from
{ signal }Pick<RequestData, 'signal'>YesNone

getMember(threadId, userId, { signal }?)

:

Promise<APIThreadMember>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the member from
userIdSnowflakeNoThe id of the user
{ signal }Pick<RequestData, 'signal'>YesNone

join(threadId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to join
{ signal }Pick<RequestData, 'signal'>YesNone

leave(threadId, { signal }?)

:

Promise<void>

Removes the current user from a thread
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to leave
{ signal }Pick<RequestData, 'signal'>YesNone

removeMember(threadId, userId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to remove the member from
userIdSnowflakeNoThe id of the user to remove from the thread
{ signal }Pick<RequestData, 'signal'>YesNone