Merge pull request #167 from acw0/master

Add current shard ID in status message
This commit is contained in:
Astrid 2020-05-02 14:22:03 +02:00 committed by GitHub
commit c551533313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,8 @@ namespace PluralKit.Bot
var totalGuilds = _client.ShardClients.Values.Sum(c => c.Guilds.Count); 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) 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) { } catch (WebSocketException) { }