Answer the question
In order to leave comments, you need to log in
How to restart the message tree when restarting the telegram bot?
With certain clicks on the buttons, the user fills in the table (about 5 actions). Let's say the user on the 3rd message deletes the chat or clears the history. How, in this case, to start all over again, as if it were a new person, because in this way he will continue from the step where he stopped
Answer the question
In order to leave comments, you need to log in
You can assign your own state to each user (I usually do this through redis) and make a script that replaces all state with the initial value. And if your bot restarts via cron, then add a reset script to run before it starts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question