Exemplo n.º 1
0
 public CommandHandler(
     IServiceProvider serviceProvider,
     IAvailableCommandsService availableCommandsService)
 {
     this.serviceProvider          = serviceProvider;
     this.availableCommandsService = availableCommandsService;
 }
Exemplo n.º 2
0
        public Bot(
            ICommandHandler commandHandler,
            IAvailableCommandsService availableCommandsService)
        {
            this.commandHandler = commandHandler;

            httpClient = new HttpClient();

            string apiKey = GetApiKey();

            telegramBotClient             = new TelegramBotClient(apiKey, httpClient);
            this.availableCommandsService = availableCommandsService;
        }