Fix various bugs and regressions

This commit is contained in:
Ske
2021-01-31 16:02:34 +01:00
parent 8785354a2b
commit 80c572f594
11 changed files with 60 additions and 57 deletions

View File

@@ -84,8 +84,7 @@ namespace PluralKit.Bot {
var totalSwitches = _metrics.Snapshot.GetForContext("Application").Gauges.FirstOrDefault(m => m.MultidimensionalName == CoreMetrics.SwitchCount.Name)?.Value ?? 0;
var totalMessages = _metrics.Snapshot.GetForContext("Application").Gauges.FirstOrDefault(m => m.MultidimensionalName == CoreMetrics.MessageCount.Name)?.Value ?? 0;
// TODO: shard stuff
var shardId = ctx.ShardNew.ShardInfo?.ShardId ?? -1;
var shardId = ctx.ShardNew.ShardInfo.ShardId;
var shardTotal = ctx.Cluster.Shards.Count;
var shardUpTotal = _shards.Shards.Where(x => x.Connected).Count();
var shardInfo = _shards.GetShardInfo(ctx.ShardNew);