I was creating a Discord Bot and I faced an issue when I tried to create an messageCreate
event listner to console.log the message content.
The problem is, it didn’t show anything. I tried many times. everything of the message object is correctly displaying except the content.
Here’s the code I’ve used.
const { Events } = require('discord.js');
module.exports = {
name: Events.MessageCreate,
async execute(message) {
console.log(message);
},
}
Here’s the console logged message object. (I only included the required part)
<ref *1> Message {
channelId: '1228243290386599981',
guildId: '1195999607080104038',
id: '1258039754834841610',
createdTimestamp: 1720010450801,
type: 0,
system: false,
content: '',
}
I also checked the intents in the index.js and the dev portal. Everything is fine.
Is this could be a bug? or an issue with the discord.js v14.15.3 ?