mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-15 18:42:44 -04:00
Redis client never has a chance to initiate so added that to the start of the bot
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using KfChatDotNetBot.Services;
|
||||||
using KfChatDotNetBot.Settings;
|
using KfChatDotNetBot.Settings;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using NLog;
|
using NLog;
|
||||||
@@ -38,9 +39,19 @@ namespace KfChatDotNetBot
|
|||||||
await BuiltIn.SyncSettingsWithDb();
|
await BuiltIn.SyncSettingsWithDb();
|
||||||
logger.Info("Migrating settings from config.json (if needed)");
|
logger.Info("Migrating settings from config.json (if needed)");
|
||||||
await BuiltIn.MigrateJsonSettingsToDb();
|
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");
|
logger.Info("Handing over to bot now");
|
||||||
Console.OutputEncoding = Encoding.UTF8;
|
Console.OutputEncoding = Encoding.UTF8;
|
||||||
new ChatBot();
|
_ = new ChatBot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user