public void Start() { _bot = new TelegramBotClient(_PKEY); Console.WriteLine("Starting bot..."); _bot.OnMessage += _botMessageHandler; _bot.OnCallbackQuery += _botCallbackHandler; _bot.StartReceiving(); _renderer = new Renderer(_bot); }
public void Handle(IRequest request, IResponseRenderer renderer) { foreach (IRequestHandler handler in _handlers) { RequestHandlingResult result = handler.HandleRequest(request); if (result.IsHandled) { renderer.Render(result.Response); return; } } }
public void Render(IResponseRenderer renderer, int chatId) { renderer.RenderPlainText(this, chatId); }
public void Render(IResponseRenderer renderer, int chatId) { renderer.RenderMenu(this, chatId); }