fix(stats): display current and total shards as current/total

This commit is contained in:
NoLogicAlan committed 2026-10-22 03:36:55 +03:00
1 parent e9d0a0b54b
commit 3e30cdc6a3
1 file changed
+3 -6
+3 -6
View File
@@ -291,13 +291,10 @@ function getShardInfo(client, guildId) {
try {
const isSharded = ShardingUtils.isShardedProcess();
const currentShard = ShardingUtils.shardIdForGuild(client, guildId);
if (isSharded) {
const totalShards = Number(process.env.FLUXER_SHARD_COUNT) || 1;
return totalShards > 1 ? `${currentShard}/${totalShards}` : `${currentShard}`;
}
return `${currentShard}`;
const totalShards = isSharded ? (Number(process.env.FLUXER_SHARD_COUNT) || 1) : 1;
return `${currentShard}/${totalShards}`;
} catch (_) {
return "0";
return "0/1";
}
}