Hi, I'm currently in the process of migrating my bot from Discord JS v12 to v13. I was able to get it to work for DMs, but in servers it refuses to listen to messages.
Here's my current code, reduced to the essential minimum. It doesn't log any server messages.
const Discord = require('discord.js');
const dotenv = require('dotenv');
dotenv.config();
const Bot = new Discord.Client({
intents: [
Discord.Intents.FLAGS.DIRECT_MESSAGES,
Discord.Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
Discord.Intents.FLAGS.GUILD_MESSAGES,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Discord.Intents.FLAGS.GUILD_MEMBERS,
],
partials: ["MESSAGE", "CHANNEL", "REACTION"],
});
Bot.login(process.env.TOKEN).catch(err => {
throw err;
})
Bot.on('messageCreate', msg => {
console.log(msg.content)
})