mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
25 lines
848 B
C#
25 lines
848 B
C#
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();
|
|
}
|
|
}
|
|
} |