mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-04 05:12:05 -04:00
Renamed the bot from KickBot -> ChatBot and removed the reference to Kick in the project name
This commit is contained in:
25
KfChatDotNetBot/Program.cs
Normal file
25
KfChatDotNetBot/Program.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Text;
|
||||
using KfChatDotNetBot.Settings;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NLog;
|
||||
|
||||
namespace KfChatDotNetBot
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var logger = LogManager.GetCurrentClassLogger();
|
||||
logger.Info("Opening up DB to perform a migration (if one is needed)");
|
||||
using var db = new ApplicationDbContext();
|
||||
db.Database.Migrate();
|
||||
logger.Info("Migration done. Syncing bultin settings keys");
|
||||
BuiltIn.SyncSettingsWithDb().Wait();
|
||||
logger.Info("Migrating settings from config.json (if needed)");
|
||||
BuiltIn.MigrateJsonSettingsToDb().Wait();
|
||||
logger.Info("Handing over to bot now");
|
||||
Console.OutputEncoding = Encoding.UTF8;
|
||||
new ChatBot();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user