Added default activity

This commit is contained in:
Loïc Bersier 2018-09-09 00:53:08 +02:00
parent ebb4575e62
commit 512080c714

View file

@ -24,11 +24,14 @@ client.registry
.registerCommandsIn(path.join(__dirname, 'commands')); .registerCommandsIn(path.join(__dirname, 'commands'));
// Ready messages // Ready messages
client.on('ready', () => { client.on('ready', () => {
// Send stats to the console
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`); 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}`); 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}`);
// Send stats to the "stats" channel in the support server // Send stats to the "stats" channel in the support server
const channel = client.channels.get('487766113292124160'); 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}`); 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.user.setActivity('"haha" or @me for help');
}); });
// When bot join a guild send embeds with details about it. // When bot join a guild send embeds with details about it.
client.on("guildCreate", guild => { client.on("guildCreate", guild => {