public ImgBot(BotConfig config, IImageSearch imageSearch)
        {
            _config      = config;
            _imageSearch = imageSearch;
            _bot         = new TelegramBotClient(Environment.GetEnvironmentVariable($"{_config.Prefix}_TELEGRAM_KEY"));

            _me = _bot.GetMeAsync().Result;

            _bot.OnMessage            += BotOnMessageReceived;
            _bot.OnMessageEdited      += BotOnMessageReceived;
            _bot.OnCallbackQuery      += BotOnCallbackQueryReceived;
            _bot.OnInlineQuery        += BotOnInlineQueryReceived;
            _bot.OnInlineResultChosen += BotOnChosenInlineResultReceived;
            _bot.OnReceiveError       += BotOnReceiveError;
        }
Beispiel #2
0
 public SearchPictureModule(IImageSearch imageSearch, IScreenMaker screenMaker, IFileStore fileStore)
 {
     _imageSearch = imageSearch;
     _screenMaker = screenMaker;
     _fileStore   = fileStore;
 }
 public ImagesController(IImageSearch imageSearch)
 {
     _imageSearch = imageSearch;
 }