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

313
Views
I cant make my bot go online and it shows TypeError [CLIENT_MISSING_INTENTS] (vscode)
const Discord = require("discord.js");
const Bot = new Discord.Client({Intents:[Discord.Intents.FLAGS.GUILD_MEMBERS, Discord.Intents.FLAGS.GUILDS]})

Bot.on('ready', () => {
    console.log("The bot is online") 

    let commands = Bot.application.commands;

    commands.create({
        name: "hello" ,
        description: "reply hello to the user",
        options: [
            {
                name: "person",
                description: "The user you want to say hello to",
                require: true,
                type: Discord.Constants.ApplicationCommandOptionTypes.USER

            }
        ]
    })
 })
    

    Bot.on('interactionCreate', interaction => {
     if(!interaction.isCommand()) return;
     let name  = interaction.commandName
     let options = interaction.options;

     if(name == "hello") {
        interaction.reply({
            content: "Hello",
            ephemeral: false
        })
    }
    if(name == "sayhello"){
        let user = options.getUser('person');

        interaction.reply({
            content: 'Hello ${user.username}
        })
    }
})

bot.login("token")
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Since discord.js v13, you need to provide Intents when declaring the client. They were introduced by Discord so that developers can choose what type of data the bot will need to receive. All you have to do is add intents when declaring the client. The code might look something like this:

const { Client } = require('discord.js')
const client = new Client({
    intents: [
        Discord.Intents.FLAGS.GUILDS,
        Discord.Intents.FLAGS.GUILD_MESSAGES
    ]
})

And also, as pointed by @Richie Bendall, you have capitalised the I when declaring the intents. You can learn more about intents in here => Gateway Intents | Discord.js

about 4 years ago · Juan Pablo Isaza Report

0

The intents is option is lowercase, not capitalised. See ClientOptions.

about 4 years ago · Juan Pablo Isaza Report

0

Well actually since the new discord.js update you need to provide the intents to the bot. This might help

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
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!