Search...

ThreadsAPI

declare class ThreadsAPI 
declare class ThreadsAPI 

No summary provided.

constructor(rest)

Constructs a new instance of the ThreadsAPI class
NameTypeOptionalDescription
restRESTNoNone

addMember(threadId, userId)

:

Promise<void>

Adds a member to a thread
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<discord_api_types_v10.APIChannel>

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

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

:

Promise<APIThreadChannel>

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

get(channelId, threadId)

:

Promise<APIThreadChannel>

Fetches a thread
NameTypeOptionalDescription
channelIdSnowflakeNoThe id of the channel to fetch the thread from
threadIdSnowflakeNoThe id of the thread

getAllMembers(threadId)

:

Promise<RESTGetAPIChannelThreadMembersResult>

Fetches all members of a thread
NameTypeOptionalDescription
threadIdSnowflakeNoThe id of the thread to fetch the members from

getMember(threadId, userId)

:

Promise<APIThreadMember>

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

join(threadId)

:

Promise<void>

Adds the current user to a thread
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>

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