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

306
Views
No puedo hacer que mi bot se conecte y muestra 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

Desde discord.js v13, debe proporcionar Intents al declarar el cliente. Fueron presentados por Discord para que los desarrolladores puedan elegir qué tipo de datos necesitará recibir el bot. Todo lo que tiene que hacer es agregar intenciones al declarar el cliente. El código podría ser algo como esto:

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

Y también, como lo señaló @Richie Bendall, ha escrito en mayúscula la I al declarar las intenciones. Puede obtener más información sobre los intentos aquí => Gateway Intents | Discord.js

about 4 years ago · Juan Pablo Isaza Report

0

La intents es la opción en minúsculas, no en mayúsculas. Consulte ClientOptions .

about 4 years ago · Juan Pablo Isaza Report

0

Bueno, en realidad, desde la nueva actualización de discord.js, debe proporcionar las intenciones al bot. esto podría ayudar

 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!