Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

0

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

about 4 years ago · Juan Pablo Isaza Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda