From 08077f6426a65fd01be63d624a41d7dcd1dc49db Mon Sep 17 00:00:00 2001 From: acw0 Date: Fri, 1 May 2020 14:17:30 -0400 Subject: [PATCH] Add current shard ID in status message --- PluralKit.Bot/Bot.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index 5f685a83..32828e49 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -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) { }