Ejemplo n.º 1
0
 public TelegramBotManager(IOptions <Settings> settingsOptions, ITelegramBotClient telegramBotClient, INumberStoreRepository numberStoreRepository, IStatsManager statsManager)
 {
     _settings              = settingsOptions.Value;
     _botClient             = telegramBotClient;
     _botClient.OnMessage  += OnMessageReceivedAsync;
     _stateTimer            = new Timer(TimerFunc, null, _settings.TimerWaitTime, _settings.TimerWaitTime);
     _insultList            = _settings.InsultsForMessingUpTheNumber;
     _numberStoreRepository = numberStoreRepository;
     _statsManager          = statsManager;
 }
Ejemplo n.º 2
0
 public StatsManager(ITelegramBotClient botClient, INumberStoreRepository numberStoreRepository, IOptions <Settings> settingsOptions)
 {
     _botClient             = botClient;
     _numberStoreRepository = numberStoreRepository;
     _settings = settingsOptions.Value;
 }