There was an error while loading. Please reload this page.
1 parent 1ae8999 commit 2de3309Copy full SHA for 2de3309
coding-guides/raw-events.md
@@ -52,6 +52,8 @@ client.on('raw', packet => {
52
const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
53
// This gives us the reaction we need to emit the event properly, in top of the message object
54
const reaction = message.reactions.get(emoji);
55
+ // Adds the currently reacting user to the reaction's users collection.
56
+ if (reaction) reaction.users.set(packet.d.user_id, client.users.get(packet.d.user_id));
57
// Check which type of event it is before emitting
58
if (packet.t === 'MESSAGE_REACTION_ADD') {
59
client.emit('messageReactionAdd', reaction, client.users.get(packet.d.user_id));
0 commit comments