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

237
Views
Discord bot Cliente no definido

Estoy tratando de hacer un bot de discordia y me encuentro con un problema:

 ReferenceError: Client is not defined at Object.<anonymous> (C:\Users\Arya\Desktop\Arya\Discord\bot.js:3:16) 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

el codigo es

 require("dotenv").config(); const { Cient, Intents } = require("discord.js"); const client = new Client({ intent: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }); bot.login(process.env.TOKEN);
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Error de sintaxis simple, esto funciona:

 require("dotenv").config(); const { Client, Intents } = require("discord.js"); const client = new Client({ intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }); client.login(process.env.TOKEN);

Su inicio de sesión en la parte inferior me confunde dónde está la variable bot, pero si mi código no funciona, puede volver a cambiarlo. De lo contrario, solo necesitaba agregar en cuanto a la intención.

about 4 years ago · Juan Pablo Isaza Report

0

  • Está definiendo Cient en lugar de Client en la segunda línea de su código
  • Las opciones del cliente deben especificar las intents: [ YOUR_INTENTS_HERE ] en lugar de la intent
  • La última línea debe ser client.login en lugar de bot.login
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!