Skip to content

Commit

Permalink
Remove cache refresh ig?
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Jan 19, 2024
1 parent 7324469 commit 360ae36
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/discord/events/ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ async function getInvites(discordClient: Client) {
});
}

async function refreshCache() {
// Loop over all the guilds
await discordClient.guilds.fetch();
discordClient.guilds.cache.forEach(async (guild:Guild) => {
await guild.members.fetch();
await guild.roles.fetch();
await guild.channels.fetch();
try {
await guild.bans.fetch();
} catch (e) {
// log.error(F, `Error fetching bans for guild ${guild.name} (${guild.id}): ${e}`);
}
await guild.emojis.fetch();
});
}
// async function refreshCache() {
// // Loop over all the guilds
// await discordClient.guilds.fetch();
// discordClient.guilds.cache.forEach(async (guild:Guild) => {
// await guild.members.fetch();
// await guild.roles.fetch();
// await guild.channels.fetch();
// try {
// await guild.bans.fetch();
// } catch (e) {
// // log.error(F, `Error fetching bans for guild ${guild.name} (${guild.id}): ${e}`);
// }
// await guild.emojis.fetch();
// });
// }

export const ready: ReadyEvent = {
name: 'ready',
Expand All @@ -85,7 +85,7 @@ export const ready: ReadyEvent = {
getInvites(client),
emojiCache(client),
populateBans(),
refreshCache(),
// refreshCache(),

// Timers
runTimer(),
Expand Down

0 comments on commit 360ae36

Please sign in to comment.