@@ -9,6 +9,7 @@ const { PartialTypes } = require('../../util/Constants');
|
||||
message_id: 'id',
|
||||
emoji: { name: '<27>', id: null },
|
||||
channel_id: 'id',
|
||||
burst: boolean
|
||||
// If originating from a guild
|
||||
guild_id: 'id',
|
||||
member: { ..., user: { ... } } }
|
||||
@@ -38,16 +39,23 @@ class MessageReactionAdd extends Action {
|
||||
me: user.id === this.client.user.id,
|
||||
...data,
|
||||
});
|
||||
console.log(reaction);
|
||||
if (!reaction) return false;
|
||||
reaction._add(user);
|
||||
reaction._add(user, data.burst);
|
||||
if (fromStructure) return { message, reaction, user };
|
||||
/**
|
||||
* Provides additional information about altered reaction
|
||||
* @typedef {Object} MessageReactionEventDetails
|
||||
* @property {boolean} burst Determines whether a super reaction was used
|
||||
*/
|
||||
/**
|
||||
* Emitted whenever a reaction is added to a cached message.
|
||||
* @event Client#messageReactionAdd
|
||||
* @param {MessageReaction} messageReaction The reaction object
|
||||
* @param {User} user The user that applied the guild or reaction emoji
|
||||
* @param {MessageReactionEventDetails} details Details of adding the reaction
|
||||
*/
|
||||
this.client.emit(Events.MESSAGE_REACTION_ADD, reaction, user);
|
||||
this.client.emit(Events.MESSAGE_REACTION_ADD, reaction, user, { burst: data.burst });
|
||||
|
||||
return { message, reaction, user };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user