diff --git a/index.js b/index.js index 853a1995..f218a5ab 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,21 @@ client.registry client.user.setActivity(activity); const channel = client.channels.get('487766113292124160'); channel.send(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`); + }); +// when bot join a guild send embeds with detail about it + client.on("guildCreate", guild => { + const channel = client.channels.get('487766113292124160'); + const exampleEmbed = { + color: 0x0099ff, + title: 'New guild!', + description: `${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`, + timestamp: new Date(), + }; + + channel.send({ embed: exampleEmbed }); + }) + // Auto respond to messages client.on("message", (message) => { if(responseObject[message.content]) {