mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix(MessageReactionAdd): prevent double messageReactionAdd triggering (#4682)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
parent
290938bf80
commit
6caeaeb391
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,8 @@ class MessageReactionAdd extends Action {
|
|||
|
||||
// Verify reaction
|
||||
if (message.partial && !this.client.options.partials.includes(PartialTypes.REACTION)) return false;
|
||||
const existing = message.reactions.cache.get(data.emoji.id || data.emoji.name);
|
||||
if (existing && existing.users.cache.has(user.id)) return { message, reaction: existing, user };
|
||||
const reaction = message.reactions.add({
|
||||
emoji: data.emoji,
|
||||
count: message.partial ? null : 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue