Message.content don't work

Hey
4 Replies
d.js toolkit
d.js toolkit11mo 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
AiwozOP11mo 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
Squid11mo ago
Do you have the MessageContent intent? You need it
Aiwoz
AiwozOP11mo ago
Ah, yes, I thought it was just GuildMessages I'm so sorry. 😭
Want results from more Discord servers?
Add your server