No summary provided.
Constructs a new instance of the
ChannelsAPI
className | Type | Optional | Description |
---|---|---|---|
rest | REST | No | None |
Adds a reaction to a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to add the reaction to |
emoji | string | No | The emoji to add the reaction with |
options | Pick<RequestData, 'signal'> | Yes | The options for adding the reaction |
Bulk deletes messages
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the messages are in |
messageIds | Snowflake[] | No | The ids of the messages to delete |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the messages |
Creates a new invite for a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to create an invite for |
body | RESTPostAPIChannelInviteJSONBody | No | The data to use when creating the invite |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the invite |
Sends a message in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to send the message in |
body | RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; } | No | The data to use when sending the message |
options | Pick<RequestData, 'signal'> | Yes | The options to use when sending the message |
Crossposts a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to crosspost |
options | Pick<RequestData, 'signal'> | Yes | The options for crossposting the message |
Deletes a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to delete |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the channel |
Deletes all reactions for a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to delete the reactions for |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the reactions |
Deletes all reactions of an emoji for a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to delete the reactions for |
emoji | string | No | The emoji to delete the reactions for |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the reactions |
Deletes a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to delete |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the message |
Deletes a reaction for the current user
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to delete the reaction for |
emoji | string | No | The emoji to delete the reaction for |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the reaction |
Deletes a reaction for a user
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to delete the reaction for |
emoji | string | No | The emoji to delete the reaction for |
userId | Snowflake | No | The id of the user to delete the reaction for |
options | Pick<RequestData, 'signal'> | Yes | The options for deleting the reaction |
Edits a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to edit |
body | RESTPatchAPIChannelJSONBody | No | The new channel data |
options | Pick<RequestData, 'signal'> | Yes | The options for editing the channel |
Edits a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to edit |
body | RESTPatchAPIChannelMessageJSONBody & { files?: RawFile[]; } | No | The data to use when editing the message |
options | Pick<RequestData, 'signal'> | Yes | The options to use when editing the message |
Follows an announcement channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the announcement channel to follow |
webhookChannelId | Snowflake | No | The id of the webhook channel to follow the announcements in |
options | Pick<RequestData, 'signal'> | Yes | The options for following the announcement channel |
Fetches a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the channel |
getArchivedThreads(channelId, archivedStatus, query?, options?):Promise<RESTGetAPIChannelUsersThreadsArchivedResult>
Fetches the archived threads of a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to fetch archived threads from |
archivedStatus | 'private' | 'public' | No | The archived status of the threads to fetch |
query | RESTGetAPIChannelThreadsArchivedQuery | Yes | The options to use when fetching archived threads |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching archived threads |
Fetches the invites of a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to fetch invites from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the invites |
getJoinedPrivateArchivedThreads(channelId, query?, options?):Promise<RESTGetAPIChannelUsersThreadsArchivedResult>
Fetches the private joined archived threads of a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to fetch joined archived threads from |
query | RESTGetAPIChannelThreadsArchivedQuery | Yes | The options to use when fetching joined archived threads |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching joined archived threads |
Fetches a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to fetch |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the message |
getMessageReactions(channelId, messageId, emoji, query?, options?):Promise<RESTGetAPIChannelMessageReactionUsersResult>
Fetches the reactions for a message
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel the message is in |
messageId | Snowflake | No | The id of the message to get the reactions for |
emoji | string | No | The emoji to get the reactions for |
query | RESTGetAPIChannelMessageReactionUsersQuery | Yes | The query options to use when fetching the reactions |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the message reactions |
Fetches the messages of a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to fetch messages from |
query | RESTGetAPIChannelMessagesQuery | Yes | The query options to use when fetching messages |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the messages |
Fetches the pinned messages of a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to fetch pinned messages from |
options | Pick<RequestData, 'signal'> | Yes | The options for fetching the pinned messages |
Fetches the webhooks of a channel
Name | Type | Optional | Description |
---|---|---|---|
id | Snowflake | No | The id of the channel |
Pins a message in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to pin the message in |
messageId | Snowflake | No | The id of the message to pin |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for pinning the message |
Shows a typing indicator in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to show the typing indicator in |
options | Pick<RequestData, 'signal'> | Yes | The options for showing the typing indicator |
Unpins a message in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to unpin the message in |
messageId | Snowflake | No | The id of the message to unpin |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for unpinning the message |