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

224
Vistas
How can I create bot joined and send guild info in my support server?

How can I add when someone adds my bot to their server the bot will send a message on my support server the info of that server is joined. Like an embed: title: Bot joined a new server description: guild name, guild id, guild invite link or server invite link

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

0

You should use the guildCreate event of the Client class for this. (https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-guildCreate)

The guildCreate event returns the guild parameter in the callback which is the guild where the bot has been added. Here is a small example how you could use this event:

const client = new Client({intents: ['Your Intents Here']});

client.on('guildCreate', guild => {
    const mainguild = client.guilds.cache.get('Your Guild ID Here');
    const channel = mainguild.channels.cache.get('Your Channel ID Here');

    const embed = new MessageEmbed()
    .setColor(`GREEN`)
    .setTitle(`Bot has been added`)
    .setAuthor(guild.name, guild.iconURL({dynamic: true}))
    .setDescription(`I've been added to the server '${guild.name}'. Here you have some more info...`)
    .setTimestamp();

    channel.send({ embeds: [embed] });
});

You can see here which properties and functions you can use for your embed

about 4 years ago · Santiago Gelvez 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