Exemplo n.º 1
0
        private async Task Ready()
        {
            var client = DiscordBotHandler.Client;

            Console.WriteLine($"{client.CurrentUser} is connected!");

            if (FirstBoot)
            {
                isDev = client.CurrentUser.Id == 535577053651664897;

                CheckMissingPerkEffects();

                data ??= new ProgramData();

                await new DatabaseCleaner(data.database).StartCleaning();

                await data.LoadStuff();

                await AppConnectionAndData();

                TaskHandler.Add("Refresh", 60 * 5, AppConnectionAndData);

                _ = WebServer.CreateHostW(isDev);
            }

            SetState(State.Ready);
            Log.LogS("Ready");
            FirstBoot = false;
        }