diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index b7e107f0..57956ad8 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -150,6 +150,7 @@ namespace PluralKit.Bot public Task Init() { + _client.ShardDisconnected += ShardDisconnected; _client.ShardReady += ShardReady; _client.Log += FrameworkLog; @@ -164,6 +165,12 @@ namespace PluralKit.Bot return Task.CompletedTask; } + private Task ShardDisconnected(Exception ex, DiscordSocketClient shard) + { + _logger.Warning(ex, $"Shard #{shard.ShardId} disconnected"); + return Task.CompletedTask; + } + private Task FrameworkLog(LogMessage msg) { // Bridge D.NET logging to Serilog