J
J
Just OK2020-01-15 20:59:15
PHP
Just OK, 2020-01-15 20:59:15

How to make a multi-step Telegram bot command?

Hello.
There is such a question.
I create a bot in Telegram using PHP webhooks.
When I press a button, a request is sent via Callback to add a bitcoin wallet, and the server sends a message, saying enter the wallet and the cancel button.
So here's the crux of the matter.
How can I track if my question has been answered.
Those. whether the user sent a bitcoin wallet or canceled.
Sequence or something like that.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur, 2020-01-15
@olejkaok

Store the current state of the user and, during the processing of his requests, respond depending on this state, change it accordingly.
Google State Machines

K
kiriharu, 2020-01-16
@kiriharu

If I understand correctly, try this example with the pyTelegramBotAPI library.
https://github.com/eternnoir/pyTelegramBotAPI/blob...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question