'messageCreate' not firing for DMs

Hey there, I'm currently having an issue where when trying to receive direct messages, the bot won't fire a messageCreate event. I have the intents and partials listed below as well as checked the docs rigorously, this is my last resort. According to the docs and guide, the bot should be configured for DMs, yet the event will not fire for them. Additional note, the event fires just fine for guild messages (when the GuildMessages intent is applied) so its nothing wrong with the event handler from what I can see. Intents: 'Guilds', 'DirectMessages', 'MessageContent' Partials: 'Channel', 'Message' Thanks for any help provided :)
11 Replies
d.js toolkit
d.js toolkit16mo 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
axiprime
axiprime16mo ago
Show event code.
Braden
BradenOP16mo ago
this is the init file
// Define Intents
const intents = [ 'Guilds', 'DirectMessages', 'MessageContent' ];

// Define Partials
const partials = [ 'Channel', 'Message' ];

// Define Presence
const presence = {
status: "online",

activities: [{ name: "for /help", type: 3 }]
};

const client = new Client({ intents, partials, presence });
// Define Intents
const intents = [ 'Guilds', 'DirectMessages', 'MessageContent' ];

// Define Partials
const partials = [ 'Channel', 'Message' ];

// Define Presence
const presence = {
status: "online",

activities: [{ name: "for /help", type: 3 }]
};

const client = new Client({ intents, partials, presence });
(the relevant part) ill grab the event code rq
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs16mo ago
interface Partials The enumeration for partials. ```js (more...)
Braden
BradenOP16mo ago
eh uno momento
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Braden
BradenOP16mo ago
just personal preference, I don't like throwing all that in the constructor its self I like it to look clean
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Braden
BradenOP16mo ago
anyway surprisingly I didn't pick up on that from my hour of reading the docs, its firing now, thanks for your help
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server