private static void InitializeAll() { // Initialize database context using (Data.UBContext ubc = new Data.UBContext( CacheData.Configuration["Database"])) { } BusinessLogic.SysConfigLogic sysConfigLogic = new BusinessLogic.SysConfigLogic(); CacheData.SysConfigs = new List <Models.SysConfig>(sysConfigLogic.Get()); BusinessLogic.OperatorLogic operatorLogic = new BusinessLogic.OperatorLogic(); CacheData.Operators = new List <Models.Operator>(operatorLogic.Get()); Bot.Manager.Initialize(CacheData.Configuration["APIKEY"]); LoadCacheData(); InitializeHangfireServer(); Controls.Manager.Initialize(); Bot.MessageQueueManager.Initialize(); Bot.CommandQueueManager.Initialize(); Utils.LogTools.Initialize(); Utils.ConfigTools.Initialize(); Utils.ChatTools.Initialize(); Utils.UserTools.Initialize(); Bot.Manager.StartReceiving(); #if DEBUG TestArea.DoTest(); #endif Data.Utils.Logging.AddLog(new Models.SystemLog() { LoggerName = CacheData.LoggerName, Date = DateTime.Now, Function = "Unifiedban Terminal Startup", Level = Models.SystemLog.Levels.Info, Message = "Startup completed", UserId = -2 }); }
static void RegisterOperators() { BusinessLogic.OperatorLogic operatorLogic = new BusinessLogic.OperatorLogic(); //operatorLogic.Add(799698579, Models.Operator.Levels.Super, -1); //operatorLogic.Add(339380551, Models.Operator.Levels.Super, -1); }