public BittrexTradeExportHandler(DatabaseService databaseService, IMicroBus bus, ILogger <BittrexTradeExportHandler> log, TelegramConfig config) { _databaseService = databaseService; _bus = bus; _log = log; _config = config; }
public Task <ITelegramBotClient> CreateAsync(TelegramConfig config) { ITelegramBotClient client = new MockTelegramBotClient( _loggerFactory.CreateLogger <MockTelegramBotClient>()); return(Task.FromResult(client)); }
public Worker(ITerminChecker terminChecker, Settings settings) { _terminChecker = terminChecker; _config = settings.GeneralConfig; _emailConfig = settings.EmailConfig; _telegramConfig = settings.TelegramConfig; }
public StartupCheckingService( IMicroBus bus, TelegramConfig telegramConfig, TelegramBot bot ) { _bus = bus; _telegramConfig = telegramConfig; _bot = bot; }
public DocumentMessageHandler( ITelegramClient telegramClient, IAmazonS3Proxy amazonS3Proxy, IDocumentRepostiory documentRepostiory, IOptions <TelegramConfig> options) { _telegramClient = telegramClient; _amazonS3Proxy = amazonS3Proxy; _documentRepostiory = documentRepostiory; _telegramConfig = options.Value; }
public ActionsListener(IServiceProvider serviceProvider) { TelegramConfig telegramConfig = serviceProvider.GetService <IOptions <TelegramConfig> >().Value; _bot = new ActionsBot(telegramConfig.Token); _allowedId = telegramConfig.UserId; _allowedUserName = telegramConfig.Username; _logger = serviceProvider.GetService <ILogger <ActionsListener> >(); _cts = new CancellationTokenSource(); }
public SenderService( IOptionsSnapshot <TelegramConfig> config, ILogger <SenderService> logger, IProxyService proxyService, IChannelConfigService channelConfigService) { _logger = logger; _proxyService = proxyService; _channelConfigService = channelConfigService; _config = config.Value; }
public void StartBot(TelegramConfig config) { try { ChatId = config.ChatId; var bot = new TelegramBotClient(config.BotToken); _telegramMessageRecieveService.StartReceivingMessages(bot); } catch (Exception ex) { _log.LogError("Could not start key. Invalid bot token\n" + ex.Message); throw; } }
public TelegramMessageRecieveService( IMicroBus bus, TelegramMessageSendingService sendingService, TelegramBittrexFileUploadService fileImportService, TelegramPairProfitService pairProfitService, TelegramConfig config, ILogger <TelegramMessageRecieveService> log) { _bus = bus; _sendingService = sendingService; _fileImportService = fileImportService; _pairProfitService = pairProfitService; _config = config; _log = log; }
public StartupCheckingService( IMicroBus bus, TelegramConfig telegramConfig, TelegramBot bot, GeneralConfig config, LiteDbDatabaseService liteDbDatabaseService, CryptoGramBotDbContext context ) { _bus = bus; _telegramConfig = telegramConfig; _bot = bot; _config = config; _liteDbDatabaseService = liteDbDatabaseService; _context = context; }
public StartupCheckingService( IMicroBus bus, TelegramConfig telegramConfig, TelegramBot bot, CoinigyConfig coinigyConfig, PoloniexConfig poloniexConfig, BittrexConfig bittrexConfig, BinanceConfig binanceConfig ) { _bus = bus; _telegramConfig = telegramConfig; _bot = bot; _coinigyConfig = coinigyConfig; _poloniexConfig = poloniexConfig; _bittrexConfig = bittrexConfig; _binanceConfig = binanceConfig; }
public static bool SendMessage(TelegramConfig telegramConfig, string toUserName, string message) { var tgClient = new TelegramBotClient(telegramConfig.ApiToken); var updates = tgClient.GetUpdatesAsync().GetAwaiter().GetResult(); try { var id = updates .Select(x => x.Message.Chat) .First(x => x.Username != null && x.Username.Equals(toUserName, StringComparison.InvariantCultureIgnoreCase)) .Id; tgClient.SendTextMessageAsync(new ChatId(id), message).GetAwaiter().GetResult(); return(true); } catch (Exception ex) { return(false); } }
public StartupCheckingService( IMicroBus bus, TelegramConfig telegramConfig, TelegramBot bot, CoinigyConfig coinigyConfig, PoloniexConfig poloniexConfig, BittrexConfig bittrexConfig, DustConfig dustConfig, BagConfig bagConfig, LowBtcConfig lowBtcConfig ) { _bus = bus; _telegramConfig = telegramConfig; _bot = bot; _coinigyConfig = coinigyConfig; _poloniexConfig = poloniexConfig; _bittrexConfig = bittrexConfig; _dustConfig = dustConfig; _bagConfig = bagConfig; _lowBtcConfig = lowBtcConfig; }
public CoreApplicationConfig() { Database = new DatabaseConfig(); Telegram = new TelegramConfig(); Cache = new CacheConfig(); }
public TelegramMessageReceiveService(ILogger <TelegramMessageReceiveService> log, TelegramConfig options, DatabaseService databaseService) { _log = log; _config = options; _databaseService = databaseService; }
public TelegramService(ILogger <TelegramService> logger, IConfiguration configuration) { _logger = logger; _telegramConfig = configuration.GetSection("Telegram").Get <TelegramConfig>(); }
public TelegramClient(IOptions <TelegramConfig> options) { _telegramConfig = options.Value; _telegramBotClient = new TelegramBotClient(_telegramConfig.Token); }
public ChannelConfigService(IOptionsSnapshot <TelegramConfig> config) { _config = config.Value; }
public SendMessageHandler(TelegramBot bot, ILogger <SendMessageHandler> log, TelegramConfig config) { _bot = bot; _log = log; _config = config; }
public SendFileHandler(TelegramBot bot, TelegramConfig config) { _bot = bot; _config = config; }
public StartupCheckingService(TelegramBot bot, TelegramConfig options) { _bot = bot; _config = options; }
public Telegram(TelegramConfig config, ISenderData sender) { _config = config; _sender = sender; }