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

192
Vistas
How can I use a specific guild ID in discord.js?

I currently am working in a script that's automatically updated, and not called by any command or message. Thus, I have no message variable to call message.guild.id with. I am making a bot for one specific server, and I need my code to edit a specific channel within that server, thus needing the server ID. I tried

let server = client.guilds.get('<guild id>'), channel;

and using the server variable to find the specific channel I want it to edit. This however gives an error. Am I missing any dependencies, or is there an easier way to do this?

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

client.guilds.get does not exist anymore. Use client.guilds.cache.get

let server = client.guilds.cache.get('<guild id>')
about 4 years ago · Juan Pablo Isaza 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