K
K
kryptobush2021-04-20 17:05:02
R
kryptobush, 2021-04-20 17:05:02

How to setup multiple CallbackQueryHandler in R?

There are 2 response functions (1 for displaying the weather, 2 for searching for posts) with different names.
Handlers are described like this:

h_query_weather <- CallbackQueryHandler(answer_cb)
h_query_habr <- CallbackQueryHandler(answer_cd)


As a result, they conflict with each other and when working with the bot, only 1 of them works, when another response is requested, the bot crashes with an error:
Error in private $request(url, data) : Bad Request (HTTP 400).
(If 1 is removed, 2 works properly)

I saw the ConversationHandler option for Python, but it is not visible in R (or I set it up incorrectly, because I can’t find an example in R).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question