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

133
Views
El bot no detectará su propia reacción incluso cuando busca

Se supone que mi bot de discordia elimina la última reacción si un usuario hace clic en una segunda reacción. Intenté obtener el mensaje, la reacción y los usuarios de reacción. Haga lo que haga, si mi bot se reinicia después de que reaccionó, reaction.me siempre es falsa. ¿Cómo puedo arreglar esto?

Este es mi código actual:

 //trying to detect a 2nd user reaction gives expected result console.log('Reaction.me: ', reaction.me) //always false no matter how many times I click the reaction if(user.bot) return; if(reaction.partial) await reaction.fetch().catch(console.log) if(reaction.message.partial) await reaction.message.fetch().catch(console.log); await reaction.users.fetch() await reaction.message.reactions.cache.find(r => r.emoji.name === (reaction.emoji.name === '⬆️') ? '⬇️' : '⬆️').users.fetch() if(!reaction.me) return; //always returns early here

Nota: después de más pruebas, parece que el usuario del cliente se encuentra en el caché, pero la reaction.me sigue siendo false . Soluciona mi problema, pero me gustaría entender por qué tengo este problema con reaction.me .

about 4 years ago · Juan Pablo Isaza
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!