Webhook message doesn't shows up as blank when doing console.log(message.content)

So it's just that, when a normal user sends a message the terminal prints their message but when a webhook sends a message the terminal prints (blank).
9 Replies
d.js toolkit
d.js toolkit12mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
W.A.D
W.A.D12mo ago
v18.14.1
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs12mo ago
If you aren't getting content, embeds or attachments of a message, make sure you have the MessageContent intent enabled in the Developer Portal and provide it to your client:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
W.A.D
W.A.D12mo ago
I actually did, sorry for not including it on the post
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildWebhooks,
IntentsBitField.Flags.MessageContent,
],
});
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildWebhooks,
IntentsBitField.Flags.MessageContent,
],
});
W.A.D
W.A.D12mo ago
W.A.D
W.A.D12mo ago
it can't read webhooks or something maybe it's because of their format (The webhook is made up by an antire body full of different images and texts) I don't know, maybe it's the embed
W.A.D
W.A.D12mo ago
It was, sorry for your time. 🙂 Thanks still thought!