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-memberundefined

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-memberundefined

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-threadundefined

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-threadundefined

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-memberundefined