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

136
Views
Por qué el bot no activa el evento messageReactionAdd cuando el mensaje se envió antes de que el bot estuviera en línea

Este es mi evento para verificar que el usuario agregue reaccionar:

 const client = require("../index"); client.on('messageReactionAdd', async (reaction, user) => { if (user.bot) return; console.log(reaction.emoji.name); });

Está funcionando, pero cuando el bot se reinicia, ¿no puede recuperar ningún mensaje enviado antes?

¿Por qué y cómo solucionarlo?

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

0

Si no habilita estructuras parciales, su código solo funciona en mensajes almacenados en caché, los que se publican después de que el bot está conectado. Reaccionar a mensajes más antiguos no activará el evento messageReactionAdd . Si también desea escuchar reacciones en mensajes antiguos, debe habilitar estructuras parciales para MESSAGE , CHANNEL y REACTION al crear una instancia de su cliente, como esta:

 const client = new Discord.Client({ intents: [/* YOUR INTENTS */], partials: ['MESSAGE', 'CHANNEL', 'REACTION'], });
about 4 years ago · Juan Pablo Isaza Report

0

Necesitas parciales:

 const client = new Client({ intents: '', // your intents here partials: ['CHANNEL', 'GUILD_MEMBER', 'GUILD_SCHEDULED_EVENT', 'MESSAGE', 'REACTION', 'USER'], });
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!