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

553
Views
¿Cómo obtengo el guild.id del servidor cuando el bot se une a discord.js v13?

como dice el título, no sé cómo obtengo el guild.id de un servidor cuando el bot acaba de unirse. Necesito el guild.id dentro del evento guildCreate.

EDITAR: Mi problema fue un error ortográfico en mi código que no se marcó como un error. Debido a que necesito el guild.id para una entrada de la base de datos, estoy usando MySQL y me faltaba un "`". Gracias por toda la ayuda.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Simplemente tome el guild como un parámetro para guildCreate:

 client.on('guildCreate', (guild) => { const { id } = guild; // do something with id });
about 4 years ago · Santiago Trujillo 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!