Exemplo n.º 1
0
        private static async Task Main()
        {
            try
            {
                Config.Instance = Config.Load(CONFIG_PATH);
                Logging.SetFileLogger(Config.Instance.LogPath);

                while (Config.Instance.Token == null || Config.Instance.Token == "")
                {
                    Console.WriteLine("Enter token:");
                    Config.Instance.Token = Console.ReadLine();
                }

                Config.Instance.Save(CONFIG_PATH);

                _discordHandler = new DiscordHandler();
                await _discordHandler.Initialize();

                Console.WriteLine($"Type admin commands here.");
            }
            catch (Exception e)
            {
                Logging.Log(e);
                throw;
            }

            while (true)
            {
                HandleCommand(Console.ReadLine());
            }
        }