fix: messageReactionRemove not emitting for partial messages (#3125)

This commit is contained in:
izexi
2019-03-19 19:32:11 +00:00
committed by SpaceEEC
parent e62833b5e1
commit 2341d13615
4 changed files with 24 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
const Action = require('./Action');
const { Events } = require('../../util/Constants');
/*
{ user_id: 'id',
@@ -31,6 +32,14 @@ class MessageReactionAdd extends Action {
me: user.id === this.client.user.id,
});
reaction._add(user);
/**
* 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
*/
this.client.emit(Events.MESSAGE_REACTION_ADD, reaction, user);
return { message, reaction, user };
}
}