I just started learning how to build a bot in JavaScript and I don’t understand why my bot isn’t replying to my message.
It has the Administrator role and it should be reading the message in chat.
What seems to be the problem here?
Thank you
const { GatewayIntentBits } = require("discord.js")
const Discord = require("discord.js")
const TOKEN = "..."
const client = new Discord.Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages]
})
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}`)
})
client.on("messageCreate", (message) => {
if (message.content == "sup"){
message.reply("Hello World!")
}
})
client.login(TOKEN)
>Solution :
Discord.js v14
You need the MessageContent intent as well.
{
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ]
}
If after this you get an error saying
Privileged intent provided is not enabled or whitelisted
Than you have to follow these steps :
Make sure to not forget the last button as it is the most important of all 3.


