Skip to content

MessageReaction

Represents a message reaction.

Kind: global class
Extends: Base

new MessageReaction([data], guildId, channelId, messageId, client)

Section titled “new MessageReaction([data], guildId, channelId, messageId, client)”

Constructs a Reaction object.

ParamTypeDescription
[data]ObjectThe data for the message reaction.
guildIdstringThe ID of the guild the reaction belongs to.
channelIdstringThe ID of the channel the reaction belongs to.
messageIdstringThe ID of the message the reaction belongs to.
clientClientThe client instance.

Retrieves the channel object associated with this instance.

Kind: instance property of MessageReaction
Returns: The channel object.

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.

Adds a user to the list of users.

Kind: instance method of MessageReaction

ParamTypeDescription
userUserThe 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

ParamTypeDescription
userUserThe user to remove.