public ServerAnswer(IBot bot, ExchangeRate exchangeRate) : base(bot) { parsingDriver = new ParsingDriver(exchangeRate); bot.telegramBotClient.OnMessage += (object?sender, Telegram.Bot.Args.MessageEventArgs e) => { var msg = $"{DateTime.Now.ToShortTimeString()}: {e.Message.Chat.FirstName} {e.Message.Chat.Id} {e.Message.Text}"; Logging.LogToConsole(msg); CheckProductAndSendMessage(e); }; bot.telegramBotClient.StartReceiving(); }
public ServerScaner(IBot bot, ExchangeRate exchangeRate) : base(bot) { parsingDriver = new ParsingDriver(exchangeRate); }