Tengo un comando de configuración donde la configuración se lleva a cabo en DM. Enviar el primer mensaje funciona, pero cada vez que envío un mensaje privado al bot, no detecta mis mensajes. Código:
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")Cuando se acaba el tiempo, me envía un dms con el mensaje de tiempo agotado.
También probé esto pero tampoco funcionó.
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")TextChannel.awaitMessages() ahora solo toma 1 argumento. Esto incluye la propiedad de filtro en el objeto. Cambiarlo a esto funcionará:
const filter = m => m.content; message.author.dmChannel.awaitMessages({ filter, max: 1, time: 60000, errors: ["time"] })