Add Owner to Logger

This commit is contained in:
Daniel Odendahl Jr
2017-04-24 02:08:27 +00:00
parent 8c88d703e3
commit 439ec22024
+4 -4
View File
@@ -29,11 +29,11 @@ client.registry
.registerCommandsIn(path.join(__dirname, 'commands'));
client.on('guildCreate', async(guild) => {
console.log(`[Guild] I have joined ${guild.name}!`);
console.log(`[Guild] I have joined ${guild.name}! (Owned by ${guild.owner.user.tag})`);
const guilds = await client.shard.fetchClientValues('guilds.size');
const count = guilds.reduce((prev, val) => prev + val, 0);
console.log(`[Count] ${count}`);
webhook(`Joined ${guild.name}!`, `Shard ${client.shard.id}`, 0x33CC33);
webhook(`Joined ${guild.name}!\nOwned by: ${guild.owner.user.tag}`, `Shard ${client.shard.id}`, 0x33CC33);
try {
const carbonStats = await carbon(count);
console.log(`[Carbon] Successfully posted to Carbon. ${carbonStats}`);
@@ -49,11 +49,11 @@ client.on('guildCreate', async(guild) => {
});
client.on('guildDelete', async(guild) => {
console.log(`[Guild] I have left ${guild.name}...`);
console.log(`[Guild] I have left ${guild.name}... (Owned by ${guild.owner.user.tag})`);
const guilds = await client.shard.fetchClientValues('guilds.size');
const count = guilds.reduce((prev, val) => prev + val, 0);
console.log(`[Count] ${count}`);
webhook(`Left ${guild.name}...`, `Shard ${client.shard.id}`, 0xFF3300);
webhook(`Left ${guild.name}...\nOwned by: ${guild.owner.user.tag}`, `Shard ${client.shard.id}`, 0xFF3300);
try {
const carbonStats = await carbon(count);
console.log(`[Carbon] Successfully posted to Carbon. ${carbonStats}`);