mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Add Owner to Logger
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user