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

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

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 Relatório

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 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