private static async Task MainAsync(params string[] args) { Console.Title = Assembly.GetExecutingAssembly().GetName().Name; BassNet.Registration("*****@*****.**", "2X25242411252422"); string configPath; switch (args.Length) { case 0: configPath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "config.json"); break; case 1: default: configPath = args[0]; break; } string agentsPath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "agents"); string commandsPath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "commands.dll"); var bot = new AudioStreamBot(); try { if (await bot.Init(configPath, agentsPath, commandsPath)) { await bot.Start(); await Task.Delay(-1); } } finally { bot.Dispose(); } Console.WriteLine("Press any key . . ."); Console.ReadKey(); }