Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js v13 if dm

const client = new discord.Client({ partials: ["CHANNEL"], intents: [
    discord.Intents.FLAGS.DIRECT_MESSAGES, 
    discord.Intents.FLAGS.DIRECT_MESSAGE_TYPING
]})
// add: partials: ["CHANNEL"]

client.on('messageCreate', message => {
   if (message.channel.type == 'DM') {
      console.log('Dm recieved!')
   }
})
 
PREVIOUS NEXT
Tagged: #dm
ADD COMMENT
Topic
Name
3+7 =