Issue with dm message event using messageCreate.
I want to log dms but whenever a dm is sent to my bot i get nothing no console log etc. But it works just fine when a msg is sent in a guild.
9 Replies
- 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 OPTo receive direct message events on
"messageCreate"
with your bot, you will need:
- The DirectMessages
gateway intent
- The Channel
partial settingalso that second channel type is wrong
its PascalCase
you didnt ask an ai to write that did you
I did for this after I got frustrated of it not working and wanted to see if I could get any insight and I forgot to make a copy of my original so here I am :sad:
ai is just gonna make it worse
I dont use it often only when im really stuck but then I remembered this server exists
:md_ohmy:
this is your issue though
either forgot the partial or both
I have intents so it is partials :E_think: