Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Trying to make discord bot but when i attempt to use 'node .' I get a client error

I am trying to create a discord bot and when i try to run "node ." in cmd after creating the code for the bot in visual studio code, I get an error message about the Client missing intents. Here is the error message.

C:\MusicBot>node .
C:\MusicBot\node_modules\discord.js\src\client\Client.js:544
      throw new TypeError('CLIENT_MISSING_INTENTS');
      ^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
    at Client._validateOptions (C:\MusicBot\node_modules\←[4mdiscord.js←[24m\src\client\Client.js:544:13)
    at new Client (C:\MusicBot\node_modules\←[4mdiscord.js←[24m\src\client\Client.js:73:10)
    at Object.<anonymous> (C:\MusicBot\main.js:3:16)
←[90m    at Module._compile (internal/modules/cjs/loader.js:1072:14)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)←[39m
←[90m    at Module.load (internal/modules/cjs/loader.js:937:32)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:778:12)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)←[39m
←[90m    at internal/main/run_main_module.js:17:47←[39m {
  [←[32mSymbol(code)←[39m]: ←[32m'CLIENT_MISSING_INTENTS'←[39m
}

My code is as follows: (the 'x' are the bots clientID)

const Discord = require('discord.js');

const client = new Discord.Client();

client.once('ready', () => {
    console.log ('Smegma Music is online!');
});


client.login('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //at end
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It's a new issue that was not in discord v12

you could use this

const { Client, Intents } = require('discord.js');

const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

OR

change discord to version 12

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!