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 forum post
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the forum channel to start the thread in |
body | StartForumThreadOptions | No | The data for starting the thread |
options | Pick<RequestData, 'signal'> | Yes | The options for starting the thread |
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 for 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 for sending the message |
options | Pick<RequestData, 'signal'> | Yes | The options for sending the message |
Creates a new thread
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to start the thread in |
body | RESTPostAPIChannelThreadsJSONBody | No | The data for starting the thread |
messageId | Snowflake | Yes | The id of the message to start the thread from |
options | Pick<RequestData, 'signal'> | Yes | The options for starting the thread |
Creates a new webhook
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to create the webhook in |
body | RESTPostAPIChannelWebhookJSONBody | No | The data for creating the webhook |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for creating the webhook |
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 the permission overwrite for a user or role in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to delete the permission overwrite in |
overwriteId | Snowflake | No | The id of the user or role to delete the permission overwrite for |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for deleting the permission overwrite |
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 for editing the message |
options | Pick<RequestData, 'signal'> | Yes | The options for editing the message |
Edits the permission overwrite for a user or role in a channel
Name | Type | Optional | Description |
---|---|---|---|
channelId | Snowflake | No | The id of the channel to edit the permission overwrite in |
overwriteId | Snowflake | No | The id of the user or role to edit the permission overwrite for |
body | RESTPutAPIChannelPermissionJSONBody | No | The data for editing the permission overwrite |
options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options for editing the permission overwrite |
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, 'reason' | '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 for 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 for 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 for 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 for 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 |
---|---|---|---|
channelId | 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 |