From 8fca8829f6e0f05b399123926ab407b51e980358 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 21 Sep 2025 13:01:19 -0500 Subject: [PATCH] Allow the bot's services to fully initialize even if the website is completely dead so that auto capture works --- KfChatDotNetBot/ChatBot.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/KfChatDotNetBot/ChatBot.cs b/KfChatDotNetBot/ChatBot.cs index 774e095..822c164 100644 --- a/KfChatDotNetBot/ChatBot.cs +++ b/KfChatDotNetBot/ChatBot.cs @@ -39,6 +39,10 @@ public class ChatBot { _logger.Info("Bot starting!"); + _logger.Debug("Starting services"); + BotServices = new BotServices(this, _cancellationToken); + BotServices.InitializeServices(); + _kfDeadBotDetection = KfDeadBotDetectionTask(); var settings = SettingsProvider.GetMultipleValuesAsync([ BuiltIn.Keys.KiwiFarmsWsEndpoint, BuiltIn.Keys.KiwiFarmsDomain, @@ -84,10 +88,6 @@ public class ChatBot _logger.Debug("Creating ping task"); _kfChatPing = KfPingTask(); - _logger.Debug("Starting services"); - BotServices = new BotServices(this, _cancellationToken); - BotServices.InitializeServices(); - _logger.Debug("Blocking the main thread"); var exitEvent = new ManualResetEvent(false); exitEvent.WaitOne();