ChannelsAPI
No summary provided.
constructor(rest)
Constructs a new instance of the
ChannelsAPI class| Name | Type | Optional | Description |
|---|---|---|---|
| rest | REST | No | None |
Adds a reaction to a message
Bulk deletes 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 |
| data | RESTPostAPIChannelInviteJSONBody | No | The data to use when creating the invite |
| reason | string | Yes | None |
Sends a message in a channel
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel to send the message in |
| data | RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; } | No | The data to use when sending the message |
Crossposts a message
Deletes a channel
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel to delete |
Deletes all reactions for a message
Deletes all reactions of an emoji for a message
Deletes a message
Deletes a reaction for the current user
Deletes a reaction for a user
Edits a channel
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel to edit |
| data | RESTPatchAPIChannelJSONBody | No | The new channel data |
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 |
| data | RESTPostAPIChannelMessageJSONBody & { files?: RawFile[]; } | No | The data to use when editing the message |
Follows an announcement channel
Fetches a channel
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel |
getArchivedThreads(channelId, archivedStatus, 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 |
| options | RESTGetAPIChannelThreadsArchivedQuery | Yes | The options to use when 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 |
getJoinedPrivateArchivedThreads(channelId, 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 |
| options | RESTGetAPIChannelThreadsArchivedQuery | Yes | The options to use when fetching joined archived threads |
Fetches a message
getMessageReactions(channelId, messageId, emoji, 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 |
| options | RESTGetAPIChannelMessageReactionUsersQuery | Yes | The options to use when fetching the reactions |
Fetches the messages of a channel
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel to fetch messages from |
| options | RESTGetAPIChannelMessagesQuery | Yes | The options to use when fetching 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 |
Pins a message in a channel
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 |
Unpins a message in a channel