mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix: messageReactionRemove not emitting for partial messages (#3125)
This commit is contained in:
@@ -43,6 +43,19 @@ class GenericAction {
|
||||
}) :
|
||||
channel.messages.get(id));
|
||||
}
|
||||
|
||||
getReaction(data, message, user) {
|
||||
const emojiID = data.emoji.id || decodeURIComponent(data.emoji.name);
|
||||
const existing = message.reactions.get(emojiID);
|
||||
if (!existing && this.client.options.partials.includes(PartialTypes.MESSAGE)) {
|
||||
return message.reactions.add({
|
||||
emoji: data.emoji,
|
||||
count: 0,
|
||||
me: user.id === this.client.user.id,
|
||||
});
|
||||
}
|
||||
return existing;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GenericAction;
|
||||
|
||||
Reference in New Issue
Block a user