Answer the question
In order to leave comments, you need to log in
How to make the bot wait for a message from the user who sent the command?
The bot is in a group. For example, I sent a command and the bot is waiting for the next message, but another user sent a message to the chat and it turns out that he recorded his message. As a result: the bot should listen to the sender of the command.
Answer the question
In order to leave comments, you need to log in
Check message.from_user.id if you ignore different if you continue with the same
Well, obviously, the bot should remember which users entered the command, and if the message is not from one of them, then ignore this message and wait again.
On the other hand, think - maybe you can get away from this system with 100500 messages altogether, and get by with command parameters?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question