From c21145563f9c2b6b28d6b4da6fc1cb66c8606fc2 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 24 Oct 2017 06:35:50 +0200 Subject: [PATCH] Fixed shard 0 restarting when bot is started in DEBUG mode (this shouldn't have affected anyone except me) --- NadekoBot.Core/Services/ShardsCoordinator.cs | 2 ++ NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index d2341090..0b1160ef 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -252,12 +252,14 @@ namespace NadekoBot.Core.Services if (!statuses.Any()) { +#if !DEBUG for (var i = 0; i < _shardProcesses.Length; i++) { var p = _shardProcesses[i]; if (p == null || p.HasExited) _shardStartQueue.Enqueue(i); } +#endif } else { diff --git a/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs b/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs index 343dbfed..a72a4865 100644 --- a/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs +++ b/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs @@ -54,7 +54,7 @@ namespace NadekoBot.Extensions private static readonly IEmote arrow_left = new Emoji("⬅"); private static readonly IEmote arrow_right = new Emoji("➡"); - + //todo update this public static Task SendPaginatedConfirmAsync(this IMessageChannel channel, DiscordSocketClient client, int currentPage, Func pageFunc, int totalElements, int itemsPerPage, bool addPaginatedFooter = true) => channel.SendPaginatedConfirmAsync(client, currentPage, (x) => Task.FromResult(pageFunc(x)), totalElements, itemsPerPage, addPaginatedFooter); ///