How do I check if the channel is a DM?

I've already tried channel.type, but it doesn't even register when i send a message in DMs, it does on servers
5 Replies
d.js toolkit
d.js toolkit2mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs2mo ago
To receive direct message events on "messageCreate" with your bot, you will need: - The DirectMessages gateway intent - The Channel partial setting
treble/luna
treble/luna2mo ago
(You can also use #djs-help-v14 for smaller questions instead of creating a post every time)
Steve
SteveOP2mo ago
Ah Thanks Will do 👍
Want results from more Discord servers?
Add your server