From c79105bb440963750cbaf0a98fad11c5dac54e78 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Fri, 1 May 2026 18:12:54 -0500 Subject: [PATCH] Redis client never has a chance to initiate so added that to the start of the bot --- KfChatDotNetBot/Program.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Program.cs b/KfChatDotNetBot/Program.cs index 3611daa..0f8dde9 100644 --- a/KfChatDotNetBot/Program.cs +++ b/KfChatDotNetBot/Program.cs @@ -20,6 +20,7 @@ */ using System.Text; +using KfChatDotNetBot.Services; using KfChatDotNetBot.Settings; using Microsoft.EntityFrameworkCore; using NLog; @@ -38,9 +39,19 @@ namespace KfChatDotNetBot await BuiltIn.SyncSettingsWithDb(); logger.Info("Migrating settings from config.json (if needed)"); await BuiltIn.MigrateJsonSettingsToDb(); + logger.Info("Attempting to grab the Redis connection multiplexer so it's built"); + try + { + _ = Redis.Multiplexer; + } + catch (Exception e) + { + logger.Error("Caught an error when attempting to grab the Redis multiplexer"); + logger.Error(e); + } logger.Info("Handing over to bot now"); Console.OutputEncoding = Encoding.UTF8; - new ChatBot(); + _ = new ChatBot(); } } } \ No newline at end of file