Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

428
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda