mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -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 {
|
try {
|
||||||
const isSharded = ShardingUtils.isShardedProcess();
|
const isSharded = ShardingUtils.isShardedProcess();
|
||||||
const currentShard = ShardingUtils.shardIdForGuild(client, guildId);
|
const currentShard = ShardingUtils.shardIdForGuild(client, guildId);
|
||||||
if (isSharded) {
|
const totalShards = isSharded ? (Number(process.env.FLUXER_SHARD_COUNT) || 1) : 1;
|
||||||
const totalShards = Number(process.env.FLUXER_SHARD_COUNT) || 1;
|
return `${currentShard}/${totalShards}`;
|
||||||
return totalShards > 1 ? `${currentShard}/${totalShards}` : `${currentShard}`;
|
|
||||||
}
|
|
||||||
return `${currentShard}`;
|
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return "0";
|
return "0/1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user