Esempio n. 1
0
 public CommandHandler(
     IServiceProvider serviceProvider,
     IAvailableCommandsService availableCommandsService)
 {
     this.serviceProvider          = serviceProvider;
     this.availableCommandsService = availableCommandsService;
 }
Esempio 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;
        }