Message.content don't work

Hey
4 Replies
d.js toolkit
d.js toolkit6mo 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
Aiwoz
Aiwoz6mo ago
Hey, In the embed, it is marked : Message:
client.on(`messageCreate`, async message => {
if (message.author.bot) {
return;
}
const messageLog = new EmbedBuilder()
.setColor(`#4CE1FE`)
.setTitle(`Message envoyé`)
.setDescription(`Message: ${message.content} \n Salon: <#${message.channel.id}> \n Par: ${message.author.displayName} \n ID: ${message.author.id}`)
.setTimestamp();
client.channels.cache.get(logsBot).send({embeds: [messageLog]});
});
client.on(`messageCreate`, async message => {
if (message.author.bot) {
return;
}
const messageLog = new EmbedBuilder()
.setColor(`#4CE1FE`)
.setTitle(`Message envoyé`)
.setDescription(`Message: ${message.content} \n Salon: <#${message.channel.id}> \n Par: ${message.author.displayName} \n ID: ${message.author.id}`)
.setTimestamp();
client.channels.cache.get(logsBot).send({embeds: [messageLog]});
});
Squid
Squid6mo ago
Do you have the MessageContent intent? You need it
Aiwoz
Aiwoz6mo ago
Ah, yes, I thought it was just GuildMessages I'm so sorry. 😭