S
S
Semyon2020-10-20 11:04:57
Python
Semyon, 2020-10-20 11:04:57

How to get user input in Telegram?

Suppose the bot asks the user to enter his name. The user types it and sends it. The question is how to receive this message and understand that this is the answer to the question about the name.
The first thought is to store the question id in the database and the next message will be the answer. But it looks crutch and can throw out bugs. If you add a button to cancel the input to the question, then it’s too hard to get from the database. Does anyone have any thoughts on getting input from the user without a database or in a more rational way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DUDE, 2020-10-20
@Hitreno

register_next_step_handler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question