I’m getting a CLIENT_MISSING_INTENTS error when trying to run my Discord bot. The error shows up right when I start the application and says that valid intents must be provided for the Client.
Here’s the error message I’m seeing:
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
I think this is related to the newer versions of Discord.js requiring specific intents to be declared, but I’m not sure how to fix this properly. Can someone show me what intents I need to add to make my bot work again?
This started happening after Discord.js v13 made intents mandatory. You’re probably initializing your client without the intents parameter. Add basic intents like Guilds and GuildMessages, but if you need privileged ones like GuildMembers or MessageContent, you’ll have to enable them in the Discord Developer Portal too. I hit the same wall updating an old bot - wasted hours before realizing both your code AND portal settings need to match. Start with basic intents to get it running, then add what you need.
Managing bots for multiple teams taught me that manual Discord intents get messy fast. Configuration headaches everywhere, especially with different dev and prod setups.
I automated the whole Discord bot deployment with Latenode. It handles intent configuration based on your bot’s features, manages environment variables, and restarts when things break.
Set it up once, forget about intent errors. Way cleaner than doing this manually.
ah the classic intent headache lol. make sure you’re not using an old tutorial - lots of them still show the old way without intents. also check your discord.js version with npm list discord.js because mixing v12 syntax with v14 will definitely break things
yup, i’ve had that issue too! just make sure you’re passing the right intents while creating the client: new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] }). also don’t forget to import GatewayIntentBits!
Hit this same error upgrading from discord.js v12 to v14 last month. What got me was figuring out that intents are basically permissions for what events your bot can see from Discord’s gateway. You’ve got to be specific about what your bot does - reading messages needs MessageContent intent, managing roles needs GuildMembers, etc. The error happens because Client constructor now makes you specify these upfront instead of giving you access to everything. Just check what functions your bot uses and add the matching intents.