message.content doesn’t have any value in Discord.js v14

Make sure you enable the message content intent on your developer portal and add the GatewayIntentBits.MessageContent enum to your intents array.

Applications ↦ Settings ↦ Bot ↦ Privileged Gateway Intents

enter image description here

You’ll also need to add the MessageContent intent:

const client = new Client({
  intents: [
    GatewayIntentBits.DirectMessages,
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildBans,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
  partials: [Partials.Channel],
});

Leave a Comment