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

557
Vistas
How do I get the guild.id from the server when the bot joins discord.js v13

as the caption says I don't know how I get the guild.id from a server when the bot just joined. I need the guild.id inside the guildCreate event.

EDIT: My problem was a misspell in my code that didn't got tagged as an error. Because I need the guild.id for a database entry I'm using MySQL and I was missing a "`". Thanks for all the help.

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

0

Just take the guild as a parameter to guildCreate:

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