class ThreadsAPI

export declare class ThreadsAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the ThreadsAPI class

addMember(
threadId: Snowflake
userId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Adds a member to a thread

See also: https://discord.com/developers/docs/resources/channel#add-thread-member

getAllMembers(
threadId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIChannelThreadMembersResult>

Fetches all members of a thread

See also: https://discord.com/developers/docs/resources/channel#list-thread-members

getMember(
threadId: Snowflake
userId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIThreadMember>

Fetches a member of a thread

See also: https://discord.com/developers/docs/resources/channel#get-thread-member

join(
threadId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Adds the current user to a thread

See also: https://discord.com/developers/docs/resources/channel#join-thread

leave(
threadId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Removes the current user from a thread

See also: https://discord.com/developers/docs/resources/channel#leave-thread

removeMember(
threadId: Snowflake
userId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Removes a member from a thread

See also: https://discord.com/developers/docs/resources/channel#remove-thread-member