Answer the question
In order to leave comments, you need to log in
Telegram bot with while?
Help guys with a telegram bot. The meaning of such a bot takes the number of workers from the sender, writes it down, and then the bot must write down the Name and surname of each worker transmitted from the sender by the counter going up to the quantity. I wrote this bot but it does not wait for a message.
Answer the question
In order to leave comments, you need to log in
You don't have a wait command in your while loop . You just stupidly go around the numbers from 1 to 5 in a cycle and send messages. There is no one more register_next_step_handler
In general, why while and not for ? In your case, the number of workers is known.
You can also prompt the user to enter the names of workers until they run out, without asking in advance their number. The trigger to complete the recording can be any word, such as "stop" or "done".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question