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")
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"]
})