My discord.js
version is 14.0.3
.
I'm trying to make a feature that requires the message content, so I created a client.on('messageCreate')
event:
client.on('messageCreate', async (message) => {
console.log(message.content)
});
But the console is sending empty (''
) strings. Every message I receive has empty content.
I added intents and partials, but it didn't change anything.
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessages],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});
How do I access the content of messages sent to servers?