Add current shard ID in status message

This commit is contained in:
acw0 2020-05-01 14:17:30 -04:00
parent 91b60367f0
commit 08077f6426

View File

@ -165,7 +165,8 @@ namespace PluralKit.Bot
var totalGuilds = _client.ShardClients.Values.Sum(c => c.Guilds.Count);
try // DiscordClient may throw an exception if the socket is closed (e.g just after OP 7 received)
{
await _client.UpdateStatusAsync(new DiscordActivity($"pk;help | in {totalGuilds} servers"));
foreach (var c in _client.ShardClients.Values)
await c.UpdateStatusAsync(new DiscordActivity($"pk;help | in {totalGuilds} servers | Shard {c.ShardId}"));
}
catch (WebSocketException) { }