MessageReactionManager

MessageReactionManager

Manages the reactions of a message.

Constructor

new MessageReactionManager(existingReactions)

Description:
  • Creates a message reaction manager.

Source:
Parameters:
Name Type Description
existingReactions Object

Existing reactions for a message.

Methods

_addReaction(userId, emoji, data)

Description:
  • Adds a reaction to a message.

Source:
Parameters:
Name Type Description
userId String

The id of the user who reacted.

emoji String

The id or unicode emoji that was reacted with.

data Object

The raw MESSAGE_REACTION_ADD data.

Throws:
TypeError

_removeReaction(userId, emoji)

Description:
  • Removes a reaction from a message.

Source:
Parameters:
Name Type Description
userId String

The id of the user whose reaction was removed.

emoji String

The id or unicode emoji for which the reaction was removed.

Throws:
TypeError

toJSON(format) → {Object}

Description:
  • Returns the JSON representation of this structure.

Source:
Parameters:
Name Type Description
format Number

The format to return the data in.

Returns:
Type
Object