mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Merge pull request #167 from acw0/master
Add current shard ID in status message
This commit is contained in:
commit
c551533313
1 changed files with 2 additions and 1 deletions
|
|
@ -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) { }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue