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

79
Views
Bot que permanece fuera de línea

Intenté crear un bot en Discord y, con varios tutoriales, seguí todas las instrucciones y parece funcionar bien al principio. Sin embargo, con todos los tutoriales, me encontré con un problema. En mi archivo index.js para mi bot, cuando abro el terminal VSCode y escribo el node index.js (que se supone que hace que mi bot se conecte), recibo los siguientes mensajes de error:

 /Users/myname/Desktop/testbot/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 (/Users/myname/Desktop/testbot/node_modules/discord.js/src/client/Client.js:544:13) at new Client (/Users/myname/Desktop/testbot/node_modules/discord.js/src/client/Client.js:73:10) at Object.<anonymous> (/Users/myname/Desktop/testbot/index.js:2:13) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { [Symbol(code)]: 'CLIENT_MISSING_INTENTS' }

Tengo node.js 16.13.0 y discord.js instalado. Mi bot es miembro de mi servidor, pero siempre está desconectado. ¿Que puedo hacer para arreglarlo?

Aquí está el código para index.js:

 const Discord = require('discord.js'); const bot = new Discord.Client(); const token = '[not putting my token online]'; const PREFIX = ''; bot.on('ready', () => { console.log('Online!'); }); bot.login(token);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que no tiene intentos agregados con su bot, lo cual es necesario para que funcione de acuerdo con la guía de inicio de discord.js

 // Require the necessary discord.js classes const { Client, Intents } = require('discord.js'); const token = 'your token here'; // Create a new client instance const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); // When the client is ready, run this code (only once) client.once('ready', () => { console.log('Ready!'); }); // Login to Discord with your client's token client.login(token);
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!