Currently I am using the latest version of Discord.js (v13.1.0).
I want to be able to detect if a certain message is a DM. I tried making a messageCreate event and did an if statement to check if the channel is a DM
client.on('messageCreate', message => {
if (message.channel.type == 'DM') {
console.log('Dm recieved!')
}
})
This for some reason didn't work. So I have no idea what will.
Here are my intents:
[Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGES]
Btw, the event does work:
client.on('messageCreate', message => {
console.log('Event')
}