Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

425
Views
How to check if a specific user reacted with a specific emoji?

I was trying to make it so that a user can only react once on a message.

This is my attempt

if(reaction.users.cache.has(user.id)) {
  reaction.remove().catch(err => {return;})
}

This always removes the reaction (I understand it's because the user just reacted). I tried checking the reaction emojis like this:

reaction.message.reactions.cache.some(r => r.emoji.name === 'my_emoji')

This always returns true because my bot reacts to it, and other people can also react.

I tried checking the docs but there is nothing like MessageReaction.user that could help.

How can I check if the specific user reacted with a specific emoji?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try accessing ReactionUserManager along with ReactionEmoji and check if the manager has the id and the current reaction's emoji is your target emoji.

reaction.message.reactions.cache
   .filter(r => r.emoji.name === 'my_emoji')
   .some(r => r.users.cache.has(user.id));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!