export declare class ThreadsAPI export declare class ThreadsAPI No summary provided.
constructor(rest)
Constructs a new instance of the
ThreadsAPI class| Name | Type | Optional | Description |
|---|---|---|---|
| rest | REST | No | None |
addMember(threadId, userId, { signal }?)
:
Promise<void>
Adds a member to a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to add the member to |
| userId | Snowflake | No | The id of the user to add to the thread |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
getAllMembers(threadId, { signal }?)
:
Promise<RESTGetAPIChannelThreadMembersResult>
Fetches all members of a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to fetch the members from |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
getMember(threadId, userId, { signal }?)
:
Promise<APIThreadMember>
Fetches a member of a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to fetch the member from |
| userId | Snowflake | No | The id of the user |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
join(threadId, { signal }?)
:
Promise<void>
Adds the current user to a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to join |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
leave(threadId, { signal }?)
:
Promise<void>
Removes the current user from a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to leave |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
removeMember(threadId, userId, { signal }?)
:
Promise<void>
Removes a member from a thread
| Name | Type | Optional | Description |
|---|---|---|---|
| threadId | Snowflake | No | The id of the thread to remove the member from |
| userId | Snowflake | No | The id of the user to remove from the thread |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |