From e267d6b5e033d28fa664d1fdea43e94e18ac2b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 8 Sep 2018 19:48:54 +0200 Subject: [PATCH] added messages when join new guild in console.log --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f218a5a..1f0e655 100644 --- a/index.js +++ b/index.js @@ -23,13 +23,13 @@ client.registry .registerDefaultCommands() .registerCommandsIn(path.join(__dirname, 'commands')); // Ready messages - client.on('ready', () => { + client.on('ready', 'guildCreate', guild, () => { console.log(`Logged in as ${client.user.tag}! (${client.user.id})`); console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`); 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}`); - + console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`) }); // when bot join a guild send embeds with detail about it client.on("guildCreate", guild => {