mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
fix(stats): display current and total shards as current/total
This commit is contained in:
1 parent
e9d0a0b54b
commit
3e30cdc6a3
1 file changed
+3
-6
+3
-6
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user