Пример #1
0
        public async Task StartAsync(CancellationToken stoppingToken)
        {
            PowerbotCore = new PowerbotCore();

            var token = _configuration["TelegramAccessToken"];

            if (token != null)
            {
                PowerbotCore.TelegramAccessToken = token;
            }

            var tokenEnvName = _configuration["TelegramAccessTokenEnvName"];

            if (tokenEnvName != null)
            {
                PowerbotCore.AccessTokenEnvName = tokenEnvName;
            }

            await PowerbotCore.StartAsync(stoppingToken);
        }
Пример #2
0
 public PowerBotBuilder()
 {
     PowerbotCore = new PowerbotCore();
 }
Пример #3
0
 public async Task StopAsync(CancellationToken cancellationToken)
 {
     await PowerbotCore.StopAsync(cancellationToken);
 }