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

222
Vistas
Discord Bot not going online
require("dotenv").config();
const { Client, Intents } = require("discord.js");

const client = new Client({
  intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
});

client.on("ready", () => {
  console.log("bot is ready");
});

client.login(process.env.DISCORD_BOT_TOKEN).catch((e) => {
  console.log(e);
});

OUTPUT

HTTPError [ReferenceError]: AbortController is not defined
    at RequestHandler.execute (g:\goofy-translator\node_modules\discord.js\src\rest\RequestHandler.js:172:15)
    at RequestHandler.execute (g:\goofy-translator\node_modules\discord.js\src\rest\RequestHandler.js:176:19)
    at RequestHandler.push (g:\goofy-translator\node_modules\discord.js\src\rest\RequestHandler.js:50:25)
    at async WebSocketManager.connect (g:\goofy-translator\node_modules\discord.js\src\client\websocket\WebSocketManager.js:128:9)
    at async Client.login (g:\goofy-translator\node_modules\discord.js\src\client\Client.js:245:7) {
  code: 500,
  method: 'get',
  path: '/gateway/bot',
  requestData: { json: undefined, files: [] }
}

The error is caused by client.login() method.Already triple checked the bot token and all seems fine. The problem isn't in the enviroment varible either, because also doesn't work when I pass the token directly.

[Resolved] The problem was the node version, discord.js requires v16 min

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Since version 13 of Discord.js, the library requires that you use a more recent Node.js version. According to the docs, you need to use Node.js version v16.6.0 or higher.

For more information about how to change your node version, or use multiple node versions, see NVM for Windows or NVM for Linux depending on your OS.

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