#Will not interact with DMs

5 messages · Page 1 of 1 (latest)

woven lake
#

I have a messageCreate event to respond to certain messages, and while the bot will "see" these messages in guilds, it won't in DMs.

Intents are set to include everything, so that shouldn't be the issue either

But only the logs in the guild (provided it wasn't a bot that sent a message) are being logged in the console (And yes, I'm DMing the bot lol). But the event itself isnt' even being called when a DM happens

lament totem
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

woven lake
#

And the implementation for the event handling into the client is

fs.readdir('./events/', (err, files) => {
  if (err) return console.error(err);
  files.forEach(file => {
    console.log(`Loading event: ${file}`);
    let eventFunction = require(`./events/${file}`);
    let eventName = file.split('.')[0];

    client.on(eventName, (...args) => eventFunction.run(client, ...args, client.sql));
  });
});
astral gobletBOT
#

To receive direct message events on "messageCreate" with your bot, you will need:
• The DirectMessages gateway intent
• The Channel partial setting