added messages when join new guild in console.log

This commit is contained in:
Loïc Bersier 2018-09-08 19:48:54 +02:00
parent 5c3fe5915c
commit e267d6b5e0

View file

@ -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 => {