From fc21d450c8efc1635eddfd6ffb089cb315675067 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 16 Jun 2024 22:09:23 -0600 Subject: [PATCH] Log some stuff --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e86d78e..bcff18d 100644 --- a/index.js +++ b/index.js @@ -40,19 +40,26 @@ client.on('ready', async () => { // Get all invites client.invites = []; // Update Invites - client.guilds.cache.forEach(guild => { //on bot start, fetch all guilds and fetch all invites to store + console.log(`${colors.cyan("[INFO]")} Fetching Invites...`); + await client.guilds.cache.forEach(guild => { //on bot start, fetch all guilds and fetch all invites to store + thisGuild = [] guild.invites.fetch().then(guildInvites => { guildInvites.each(guildInvite => { client.invites[guildInvite.code] = guildInvite.uses + thisGuild.push(guildInvite.code) }) + }).then(() => { + console.log(`${colors.cyan("[INFO]")} Fetched ${thisGuild.length} Invites for ${colors.green(guild.name)}`); }) guild.fetchVanityData().then(vanityData => { client.invites[vanityData.code] = vanityData.uses }).catch(err => { // Do nothing }) + }) + // Register commands const commands = [