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
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