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

315
Views
Estoy tratando de crear un bot de discord pero no puedo ejecutarlo con 'node index.js'. ¿Cómo puedo solucionar esto?

Este es el código que creé para ejecutar el bot (todavía soy muy nuevo en la codificación, así que me disculpo y el token se regeneró, así que no se preocupe):

 const Discord = require('discord.js'); const { Client, Intents } = require ('discord.js'); const client = new Discord.Client({ intents: [Intents.FLAGS.GUILDS] }) client.on('ready', () => { console.log(`We are now online!`); }); client.on('message', msg => { if (msg.content === '!help') { msg.reply('Help yourself.'); } }); client.login('j1mz8eMBhKcgY4yZEzbXG4sxuniVB0AY');

Esta es la advertencia que recibí cuando usé 'node index.js':

 (node:64810) UnhandledPromiseRejectionWarning: ReferenceError: AbortController is not defined at RequestHandler.execute (/Users/Name/Desktop/Bots/node_modules/discord.js/src/rest/RequestHandler.js:172:15) at RequestHandler.execute (/Users/Name/Desktop/Bots/node_modules/discord.js/src/rest/RequestHandler.js:176:19) at RequestHandler.push (/Users/Name/Desktop/Bots/node_modules/discord.js/src/rest/RequestHandler.js:50:25) at async WebSocketManager.connect (/Users/Name/Desktop/Bots/node_modules/discord.js/src/client/websocket/WebSocketManager.js:128:9) at async Client.login (/Users/Name/Desktop/Bots/node_modules/discord.js/src/client/Client.js:245:7) (Use `node --trace-warnings ...` to show where the warning was created)

No estoy seguro de qué hacer para arreglar esto.

about 4 years ago · Juan Pablo Isaza
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!