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

412
Views
¿Por qué mi terminal no me permite ejecutar node index.js?

Traté de ejecutar el nodo index.js en la terminal pero apareció este error: TypeError: No se pueden leer las propiedades de undefined (leyendo 'Guilds'). El siguiente es mi código:

 const { Client, GatewayIntentBits } = require('discord.js'); const client = new Client({ intents: [GatewayIntentBits.Guilds] }); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); client.on('interactionCreate', async (interaction) => { if (!interaction.isCommand()) return; if (interaction.commandName === '!help') { await interaction.reply('I dont want to haelp u'); } }); client.login('OTQ0NjQyMDQ3MTI0NTgyNTEw.YhEkdg.e2AspV6x5JtTqKkq24DkeMmDlSo');

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tal vez haya un problema con el Intent. Como no ha proporcionado la salida de error, le sugiero que use

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

Reemplace este código con sus dos primeras líneas de código, que es:

 const { Client, GatewayIntentBits } = require('discord.js'); const client = new Client({ intents: [GatewayIntentBits.Guilds] });

Y, por favor, nunca comparta el token de bot. Es como las credenciales de inicio de sesión para su bot. Por favor reinícialo en tu consola de desarrollador de Discord.

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!