From 72f071ce1a1b0324a73fb49dc27474eb9e1dbc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 8 Sep 2018 19:50:01 +0200 Subject: [PATCH] fixing bug --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1f0e655..baa0bc3 100644 --- a/index.js +++ b/index.js @@ -23,14 +23,16 @@ client.registry .registerDefaultCommands() .registerCommandsIn(path.join(__dirname, 'commands')); // Ready messages - client.on('ready', 'guildCreate', guild, () => { + client.on('ready', () => { 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}`); + client.on("guildCreate", guild => { 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 => { const channel = client.channels.get('487766113292124160');