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
ReferenceError: reload is not defined

Basically my first error was TypeError: require(...) is not a function, so I immediately put a ; at the end of require("./handlers/slashcommands"). But then I come home with this error: ReferenceError: reload is not defined. This is after I put ; after my requirment. I'm mainly worrying about this part:

client.slashcommands = new Discord.Collection()

client.loadSlashCommands = (bot, reload) => require("./handlers/slashcommands");
(bot, reload)
client.loadSlashCommands(bot, false)

Any help would be appreciated!

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

(bot, reload), by itself, is nonsense (and you get the error because bot and reload are arguments to the arrow function, so when you move (bot, reload) outside it, the variable isn't available).

It is supposed to call the function returned by require(...).

Take the semi-colon back out:

(bot, reload) => require("./handlers/slashcommands")(bot, reload);

Then you need to address the real problem, which is that the slashcommands module is supposed to export a function, but currently doesn't.

about 4 years ago · Santiago Gelvez 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