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

119
Views
¿Por qué no funciona el código? Ni client.on("ready") está funcionando ni client.on("messageCreate")

este es el código, de la mayoría de las fuentes que he visto, esto debería funcionar

este es el archivo completo

 const Discord = require("discord.js") const TOKEN = "" const client = new Discord.Client({ intents: [ "GUILDS", "GUILD_MESSAGES" ] }) client.on("ready", () => { console.log('Logged in as ${client.user.tag}') }) client.on("messageCreate", (message) => { if (message.content == "hi") { message.reply("Hello") } }) client.login(TOKEN)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tus intenciones están configuradas incorrectamente...

prueba esto:

 intents: [ Discord.Intents.FLAGS.GUILDS, Discord.Intents.FALGS.GUILD_MESSAGES ]

Acerca de MessageCreate :

Si necesita que su bot reciba mensajes ( MESSAGE_CREATE - "messageCreate" en discord. js), necesita la intención GUILD_MESSAGES . Hecho así: Discord.Intents.FALGS.GUILD_MESSAGES

Más sobre privilegios de intención

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!