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

214
Views
¿Cómo actualizo este comando a v13? Intenté varias formas pero no tuve éxito.

No obtengo ninguna respuesta después de enviar la respuesta. ¿Cómo lo arreglo?

 const ws = require('../../configs/words.json'); const word = ws[Math.floor(Math.random() * ws.length)]; const filter = response => { return word.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase()); }; message.channel.send(word.question).then(() => { message.channel.awaitMessages(filter, { max: 1, time: 600000, errors: ['time'] }) .then(collected => { message.reply(`${collected.first().author} got the correct answer! + 1 tickets!`); }) .catch(collected => { message.channel.send('Noone has guessed the word in time.'); }); });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Pruebe esto, se reconstruyó un poco pero debería funcionar igual:

 const ws = require('../../configs/words.json'); const word = ws[Math.floor(Math.random() * ws.length)]; const filter = response => { return word.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase()); }; message.channel.send(word.question).then(() => { return message.channel.awaitMessages({ filter, max: 1, time: 600000, errors: ['time'] }).catch(() => { throw new Error('Timed Out') }).then(collected => { message.reply(`${collected.first().author} got the correct answer! + 1 tickets!`); }) .catch(error => { switch (error.message) { case 'Timed Out': message.channel.send('Noone has guessed the word in time.'); break })
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!