public void ParseArguments_EmptyArgs_ReturnsEmptyObject()
        {
            var args = new string[0];

            var result = processor.ParseArguments <object>(args);

            Assert.That(result, Is.TypeOf(typeof(object)));
        }
Example #2
0
        public static void Main(string[] args)
        {
            Logger.Init();

            ArgumentsProcessor.ParseArguments(args);

            //Ascii art of Pootis-Bot because why not ¯\_(ツ)_/¯
            Console.WriteLine(@"__________              __  .__                 __________        __   ");
            Console.WriteLine(@"\______   \____   _____/  |_|__| ______         \______   \ _____/  |_ ");
            Console.WriteLine(@" |     ___/  _ \ /  _ \   __\  |/  ___/  ______  |    |  _//  _ \   __\");
            Console.WriteLine(@" |    |  (  <_> |  <_> )  | |  |\___ \  /_____/  |    |   (  <_> )  |  ");
            Console.WriteLine(@" |____|   \____/ \____/|__| |__/____  >          |______  /\____/|__|  ");
            Console.WriteLine(@"                                    \/                  \/             ");
            Console.WriteLine($"			Version: {VersionUtils.GetAppVersion()}");
            Console.WriteLine();

            Logger.Info("Pootis-Bot starting...");

            Logger.Debug("Creating the HttpClient object...");
            Global.HttpClient = new HttpClient();

            Logger.Debug("Setting up global variables...");
            Global.BotName   = Config.bot.BotName;
            Global.BotPrefix = Config.bot.BotPrefix;
            Global.BotToken  = Config.bot.BotToken;

            //Check the audio services, if they are enabled
            MusicLibsChecker.CheckMusicService();

            Console.Title = $"{Global.BotName} Console";

            //Setup the bot, put in the name, prefix and token
            Logger.Debug("Creating the bot instance...");
            Bot bot = new Bot();

            Logger.Debug("Starting the bot...");

            //Start her up!
            bot.StartBot().GetAwaiter().GetResult();
        }