diff --git a/NadekoBot.Core/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs index a672ba2d..e35cf0b1 100644 --- a/NadekoBot.Core/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -317,7 +317,8 @@ namespace NadekoBot.Modules.Administration // ignored } await Task.Delay(2000).ConfigureAwait(false); - Environment.Exit(0); + var sub = _cache.Redis.GetSubscriber(); + sub.Publish(_creds.RedisKey() + "_die", "", StackExchange.Redis.CommandFlags.FireAndForget); } [NadekoCommand, Usage, Description, Aliases] diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index 645bff1f..4f4aa948 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -65,6 +65,10 @@ namespace NadekoBot.Core.Services sub.Subscribe(_key + "_shardcoord_stop", OnStop, CommandFlags.FireAndForget); + + sub.Subscribe(_key + "_die", + (ch, x) => Environment.Exit(0), + CommandFlags.FireAndForget); } private void OnStop(RedisChannel ch, RedisValue data)