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)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to add the member to
userIdSnowflakeNoThe id of the user to add to the thread

create(channelId, { message_id, ...body })

:

Promise<import("discord-api-types/v10").APIChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to start the thread in
{ message_id, ...body }StartThreadOptionsNoNone

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

:

Promise<APIThreadChannel>

NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the forum channel to start the thread in
{ message, ...optionsBody }StartForumThreadOptionsNoNone

get(threadId)

:

Promise<APIThreadChannel>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread

getAllMembers(threadId)

:

Promise<RESTGetAPIChannelThreadMembersResult>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the members from

getMember(threadId, userId)

:

Promise<APIThreadMember>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the member from
userIdSnowflakeNoThe id of the user

join(threadId)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to join

leave(threadId)

:

Promise<void>

Removes the current user from a thread
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to leave

removeMember(threadId, userId)

:

Promise<void>

NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to remove the member from
userIdSnowflakeNoThe id of the user to remove from the thread