D
D
Drofko2017-10-29 20:57:41
Python
Drofko, 2017-10-29 20:57:41

How to stop the telegram bot from receiving messages for a certain period of time?

Tell me how you can do that if the answer to the question is not correct, the bot would not accept all messages during what period of time, and is it really possible to do this at all

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nllm, 2017-10-29
@Drofko

If the answer is incorrect, write the date and time of the answer to the database / session.
On subsequent requests, check the time of the request and the time of the last incorrect response + block time. If the time has not yet come, then simply ignore the request.
Using sleep is not very good.

K
kzoper, 2017-10-29
@kzoper

time.sleep(1) ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question