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

84
Views
discord.js - MessageCollector no terminará

El colector no terminará, incluso si hay un tiempo establecido en 1.

 const filter = msg => msg.author.id === message.author.id; const collector = new MessageCollector(message.channel, filter, { max: 3, time: 5000, }) collector.on('collect', collector => { console.log(`${collector.content}`) }) collector.on('end', collected => { console.log(`${collected.size}`) })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El constructor toma argumentos (channel, options) y no (channel, filter, options) . El filter debe ser parte del objeto de options . Ver documentos .

En este momento, está pasando la función de filter en lugar de un objeto de options , seguido de lo que debería ser un objeto de options pero en realidad es solo un tercer argumento superfluo ignorado.

Esta es la forma correcta:

 const collector = new MessageCollector(message.channel, { filter, max: 3, time: 5000 })
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!