Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
time channel refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Dec 24, 2021
1 parent 2df3cee commit 30eb67d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/events/ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ready: event = {
async execute(client: Client) {
logger.info(`Ready! Logged in as ${client.user?.tag}`);
const secondaries = await db.secondary.findMany();
logger.time("refreshchannels");
Promise.all(
secondaries.map(async (secondary) => {
// const cachedChannel = client.channels.cache.get(secondary.id);
Expand All @@ -34,7 +35,7 @@ export const ready: event = {
})
)
.catch((error) => logger.error(error))
.then(() => logger.debug("Channels Restored"));
.then(() => logger.timeEnd("refreshchannels"));
updateActivityCount(client);
},
};

0 comments on commit 30eb67d

Please sign in to comment.