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

68
Vistas
message.author.dmChannel.awaitMessages not working

I have a setup command where the setup takes place in DMs. Sending the first message works but whenever I dm the bot it doesn’t detect my messages. Code:

const filter = m => m.content;
message.author.dmChannel.awaitMessages(filter, {
  max: 1,
  time: 60000,
  errors: ["time"]
}).then(collected => {
  collected.reply("message collected message");
}.catch(() => message.author.send("ran out of time message")

When the time runs out it dms me the ran out of time message

I also tried this but it also didn’t work

const filter = m => m.content;
message.author.dmChannel.awaitMessages({
  filter,
  max: 1,
  time: 60000,
  errors: ["time"]
}).then(collected => {
  collected.reply("message collected message");
}.catch(() => message.author.send("ran out of time message")
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

TextChannel.awaitMessages() now only takes 1 argument. This includes the filter property in the object. Changing it to this will work:

const filter = m => m.content;
message.author.dmChannel.awaitMessages({
  filter,
  max: 1,
  time: 60000,
  errors: ["time"]
})
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