Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

65
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda