The bot does not detect the contents of the messages

jsclient.on(Events.MessageCreate, async message => {

if (message.author.bot) return;

console.log('Contenido del mensaje: ', message.content);

if (message.embeds.length > 0) {
console.log('Contenido del embed: ', message.embeds[0].description);
}
}); js
jsclient.on(Events.MessageCreate, async message => {

if (message.author.bot) return;

console.log('Contenido del mensaje: ', message.content);

if (message.embeds.length > 0) {
console.log('Contenido del embed: ', message.embeds[0].description);
}
}); js
This is a fragment of my index file.js, since the complete code does not want to work I began to make it simpler and simpler until I got what the error is, and I realized that the bot is not getting the content of the messages, if I send a message that says "Hello" the bot detects almost everything, except for the content, the bot already verifies that it has all the permissions (literally it is as administrator) and that the necessary resources are called, I am using the latest version of Discord.js I already updated the file while searching for the error
4 Replies
d.js toolkit
d.js toolkit10mo 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
Ruthless_Mercy_
Ruthless_Mercy_10mo ago
my version node is v18.17.1 and discord v14.13.0 and this is de cmd, I do not show it complete because the rest of the cmd is information that has nothing to do with the message, but it is seen that in content has nothing although the mesaje that I detect if I should have a simple hello
space
space10mo ago
Looks like you are missing the message content intent.
Ruthless_Mercy_
Ruthless_Mercy_10mo ago
You are God Brother as I didn't see it, very thanks you