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

212
Visualizações
Discord bot wont respond to messages sent in dms

I have setup all of the required intents including DIRECT_MESSAGES though the client messageCreate event doesn't appear to be picking up the command and responded now I checked the bot and the command does indeed work in the guild but for some reason not in dms.

My code block

client.on('messageCreate', (message) => {
    if (message.author.bot) return;
    const msg = message
    const args = message.content.slice(1).split(/ +/)
    const args2 = message.content.split(/ +/)
    if (msg.content.toLowerCase() === '!resetverify') {
      if (!message.author.id === '853322763930828800') return
      db.set("verifyTicketAmount", 0)
      message.reply('Cleared')
    }
  })
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Make sure you have the right intents, I personally use the "all intents" like below

const bot = new Client({
    intents: 131071,
    partials: ['CHANNEL', 'GUILD_MEMBER', 'GUILD_SCHEDULED_EVENT', 'MESSAGE', 'REACTION', 'USER']
})

You can see all the intents here: Intents

or use 131071 for all of them

Updated intents include all new intents, 32767 no longer includes all of them

about 4 years ago · Santiago Trujillo 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