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

166
Vistas
How can I make the reaction collector choose the first 2 reactions?

So I try to make reaction collector that pause/play the music after user react to the reaction, But my collector stops when user react 1 time (the user can't react twice, only once), how can i fix it? this is my code:

 queue.textChannel.send(thing).then((question) => {
          question.react('⏸');
          question.react('▶️');
          question.react('⬅️');
          question.react('⏹️');


          const filter = (reaction, user) => {
             return ['⏹️', '⬅️','⏸','▶️'].includes(reaction.emoji.name) && !user.bot;
          };

          const collector = question.createReactionCollector(filter, {
             max: 1,
             time: 0
          }); 


          collector.on('end', (collected, reason) => {
             if (reason === 'time') {
                msg.reply('Times Up');
             } else {

                const userReaction = collected.array()[0];
 
                const emoji = userReaction._emoji.name;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I fixed it by changing the collector from 'end' to 'collect' and deleted the max: option.

            queue.textChannel.send(thing).then((question) => {
          question.react('⏸');
          question.react('▶️');
          question.react('⬅️');
          question.react('⏹️');


          const filter = (reaction, user) => {
             return ['⏹️', '⬅️','⏸','▶️'].includes(reaction.emoji.name) && !user.bot;
          };

      const collector = question.createReactionCollector(filter, { time: 400000 });



      collector.on('collect', (reaction, reactionCollector) => {

 
                const emoji = reaction.emoji.name;

@ZsoltMeszaros Helped me with the right answer.

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