Events.MessageCreate does not invoke

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
client.on(Events.MessageCreate, message => {
if (message.author.bot) return;
console.log(`Message received: ${message.content}`);
});
client.on(Events.MessageCreate, message => {
if (message.author.bot) return;
console.log(`Message received: ${message.content}`);
});
Nothing is logged.
2 Replies
d.js toolkit
d.js toolkit3d 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
Shaffan
ShaffanOP3d ago
Discord.js version: 14.17.3 Node.js version: 20.6.1

Did you find this page helpful?