Adds a reaction to the specified message using the provided emoji.
This method sends a request to the Discord API to add a reaction to a message in a specific channel. The reaction is represented by the emoji provided as a string (Unicode emoji or custom emoji ID).
The emoji to react with. This can be a Unicode emoji or a custom emoji in the format name:id
.
A promise that resolves when the reaction has been added.
Deletes a message from the specified channel.
This method sends a request to the Discord API to permanently delete a specific message identified by its ID within the given channel. Once deleted, the message cannot be recovered.
A promise that resolves when the message has been successfully deleted.
Edits the properties of the message with the specified options.
This method sends a request to the Discord API to update the message's attributes identified by its ID within the specified channel. The updated message data will be reflected in the current instance after the operation is successful.
The options for editing the message, which can include:
- content
: The new content of the message (up to 2000 characters).
- embeds
: An array of embed objects (up to 10 rich embeds).
- flags
: Integer to edit the flags of a message (currently only SUPPRESS_EMBEDS).
- allowed_mentions
: An object specifying allowed mentions.
- components
: An array of message components (buttons, select menus, etc.).
- attachments
: An array of attachment objects for new files.
Optional
allowed_Optional
attachments?: any[]Optional
components?: any[]Optional
content?: stringOptional
embeds?: any[]Optional
flags?: numberA promise that resolves to the updated Message instance.
Retrieves the reactions for a specific message using the provided emoji.
This method sends a request to the Discord API to get a list of reactions for a specific message with the provided emoji. The emoji can be a Unicode emoji or a custom emoji ID.
The emoji to search for. This can be a Unicode emoji or a custom emoji in the format name:id
.
Optional query parameters to refine the results.
Optional
after?: stringGet reactions after this user ID (optional).
Optional
limit?: numberMax number of reactions to return (1-100).
Optional
type?: numberThe type of reaction (optional).
A promise that resolves to an array of Reaction instances for the given emoji.
Removes all reactions from the specified message.
This method sends a request to the Discord API to remove all reactions from a message in a specific channel. It removes reactions for all emojis that were added to the message.
A promise that resolves when all reactions have been removed.
Removes the user's reaction from the specified message.
This method sends a request to the Discord API to remove a reaction that the user added to a message. If a user ID is provided, it removes that specific user's reaction; otherwise, it removes the current user's reaction.
The emoji for the reaction to be removed. This can be a Unicode emoji or a custom emoji in the format name:id
.
Optional
userId: stringOptional. The ID of the user whose reaction should be removed. If not provided, it removes the current user's reaction.
A promise that resolves when the reaction has been removed.
Represents a message in a channel.