Answer the question
In order to leave comments, you need to log in
How to make the bot clear the chat after a certain time of inactivity?
I need to make sure that after, for example, 30 minutes of inactivity in a chat with a bot, it clears the communication history. How could this be done. aiogram library
Answer the question
In order to leave comments, you need to log in
Start a timer at the beginning of the program with a countdown of half an hour and an attached callback. After the time passes, the chat clear callback will be executed, unless the countdown is reset when a new message is received.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question