Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
Discord.js Emoji Collector

i have litle problem when i using collector i tried test with logging actions. Then where is problem when i remove/delete reaction from message its doesnt react i must add reaction first time and that removing/deleting reaction detect works after setting first time reaction but previously reaction doesnt works.

const collector = msg.createReactionCollector({ dispose: true });
collector.on('collect', (reaction, user) => {
   console.log("Collect");
});
collector.on('remove', (reaction, user) => {
   console.log("remove");
});
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

If I understood your question correctly, what's happening here is that the message in which the reactions are being added/removed is not cached by the bot on boot, and it is only cached after the first reaction gets added or removed from it, this is why the second action is detected but the first one isn't.

One away to solve this would be to cache the message on startup by fetching it using <TextChannel>.messages.fetch(<MESSAGE_ID>).

about 4 years ago · Juan Pablo Isaza Denunciar

0

I find way how fix this

msg.createReactionCollector({ dispose: true });

client.on('messageReactionAdd', (reaction, user) =>
{
    console.log("ReactionAdded");
});

client.on('messageReactionRemove', (reaction, user) =>
{
    console.log("ReactionAdded");
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda