Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!