Skip to content

Commit

Permalink
fix(topgg): Fix error handling in syncBotlistStats task
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Feb 6, 2024
1 parent bd086a8 commit 39a5d7a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/scripts/tasks/syncBotlistStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ export default async (manager: ClusterManager) => {
const serverCount = count.reduce((p, n) => p + n, 0);
const { totalShards: shardCount } = manager;

await topgg.postStats({ serverCount, shardCount });
try {
await topgg.postStats({ serverCount, shardCount });

Logger.info(`Updated top.gg stats with ${serverCount} guilds and ${shardCount} shards`);
Logger.info(`Updated top.gg stats with ${serverCount} guilds and ${shardCount} shards`);
}
catch (e) {
Logger.error('Error updating top.gg stats', e);
}
};

0 comments on commit 39a5d7a

Please sign in to comment.