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

170
Views
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 answers
Answer question

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