public TelegramMessengerLogger(string name, TelegramMessengerLoggerConfiguration config) { _name = name; _config = config; if (_config.UseSocks5) { var httpClientHandler = new HttpClientHandler { Proxy = new HttpToSocks5Proxy(_config.Socks5Host, _config.Socks5Port), UseProxy = true }; var httpClient = new HttpClient(httpClientHandler); _botClient = new TelegramBotClient(_config.TelegramToken, httpClient); } _botClient = new TelegramBotClient(_config.TelegramToken); }
public TelegramMessengerLoggerProvider(TelegramMessengerLoggerConfiguration config) { _config = config; }