Dms not being read by Event.messageCreate in listener.
So after an hour of research and checking the guide every 10 minutes, I am fairly confused on why my bot is not reading DMs. This is to implement a ModMail system to my existing bot.
The full repo is here on the major development branch: https://github.com/MiekoHikari/VTA-Discord-Bot/tree/major-development
Im sure I put in the right bitfield intents and I used the sapphire CLI to generate a ts template for me! I'm sure its a silly mistake somewhere but can't find it V - V
GitHub
GitHub - MiekoHikari/VTA-Discord-Bot at major-development
A Discord Bot Coded in Node.js to assist in activities within VTA - GitHub - MiekoHikari/VTA-Discord-Bot at major-development
Solution:Jump to solution
For DMs you need to enable message partials. https://discordjs.guide/popular-topics/faq.html#enabling-partials
FYI this is not a sapphire thing, the same would count if you just used Discordjs raw. Sapphire doesn't do anything special like forwarding or filtering events, we only bind them to the client, that's it....
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
3 Replies
Code goes above message limit, give me a sec
The code im having trouble with:
https://github.com/MiekoHikari/VTA-Discord-Bot/blob/major-development/src/listeners/ModMail.ts
searched dm, first results: 🤓
Solution
For DMs you need to enable message partials. https://discordjs.guide/popular-topics/faq.html#enabling-partials
FYI this is not a sapphire thing, the same would count if you just used Discordjs raw. Sapphire doesn't do anything special like forwarding or filtering events, we only bind them to the client, that's it.
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.