MessageReaction
MessageReaction ⇐ Base
Section titled “MessageReaction ⇐ Base”Represents a message reaction.
Kind: global class
Extends: Base
- MessageReaction ⇐
Base- new MessageReaction([data], guildId, channelId, messageId, client)
- .channel ⇒
- .guild ⇒
- .fetch() ⇒
Promise.<(Reaction|null)> - .remove() ⇒
Promise.<this> - ._addUsers(user) ⇒
void - ._removeUsers(user) ⇒
void
new MessageReaction([data], guildId, channelId, messageId, client)
Section titled “new MessageReaction([data], guildId, channelId, messageId, client)”Constructs a Reaction object.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data for the message reaction. |
| guildId | string | The ID of the guild the reaction belongs to. |
| channelId | string | The ID of the channel the reaction belongs to. |
| messageId | string | The ID of the message the reaction belongs to. |
| client | Client | The client instance. |
messageReaction.channel ⇒
Section titled “messageReaction.channel ⇒”Retrieves the channel object associated with this instance.
Kind: instance property of MessageReaction
Returns: The channel object.
messageReaction.guild ⇒
Section titled “messageReaction.guild ⇒”Get the guild associated with this channel.
Kind: instance property of MessageReaction
Returns: The guild object associated with this channel.
messageReaction.fetch() ⇒ Promise.<(Reaction|null)>
Section titled “messageReaction.fetch() ⇒ Promise.<(Reaction|null)>”Fetches a message from a channel and retrieves a reaction associated with it.
Kind: instance method of MessageReaction
Returns: Promise.<(Reaction|null)> - A Promise that resolves to the Reaction object if found, or null if not found.
messageReaction.remove() ⇒ Promise.<this>
Section titled “messageReaction.remove() ⇒ Promise.<this>”Removes the reaction associated with this message.
Kind: instance method of MessageReaction
Returns: Promise.<this> - - A promise that resolves to the current instance of the class.
messageReaction._addUsers(user) ⇒ void
Section titled “messageReaction._addUsers(user) ⇒ void”Adds a user to the list of users.
Kind: instance method of MessageReaction
| Param | Type | Description |
|---|---|---|
| user | User | The user to add. |
messageReaction._removeUsers(user) ⇒ void
Section titled “messageReaction._removeUsers(user) ⇒ void”Removes a user from the list of users.
Kind: instance method of MessageReaction
| Param | Type | Description |
|---|---|---|
| user | User | The user to remove. |