E
E
exetico2020-10-01 16:18:49
JavaScript
exetico, 2020-10-01 16:18:49

How to split query for telegram users?

I'm trying to set up a telegram bot, when you press the start button, the bot should give out answer options, I implemented this through the inline keyboard, i.e. start=>question - inline keyboard => the next question is selected depending on the previous answer, using the correct date.
For one user, everything works, but if you start writing to the bot from two accounts at the same time, then the callback query begins to receive a response from any of the users and, as a result, sends two (equivalent to the number of users) identical questions to one user, while the second bot remains waiting desired date indefinitely.
Question: is it possible to somehow isolate the callback_query for each user?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
robprane, 2020-10-01
@robprane

https://core.telegram.org/bots/api#callbackquery
CallbackQuery contains a from parameter, so it is already isolated. The problem is on your side. You are probably sending a response to a hardcoded id, it's hard to tell without showing the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question