Пример #1
0
        // async main
        public async Task MainAsync()
        {
            Locator.Instance.Fetch <ILogger>().LogLine("Starting up the bot.");
            _bot = new DiscordBot();
            await _bot.LoginAsync();

            await _bot.StartAsync();

            Locator.Instance.Fetch <ILogger>().LogLine("Awaiting main thread.");
            await Task.Delay(-1);
        }
Пример #2
0
        // async main
        public async Task MainAsync()
        {
            Console.WriteLine("Starting up the bot.");
            _bot = new DiscordBot();
            await _bot.LoginAsync();

            await _bot.StartAsync();

            Console.WriteLine("Awaiting.");
            await Task.Delay(-1);
        }