Answer the question
In order to leave comments, you need to log in
How to do checks in Aiogram bot?
We need to add checks to the aiogram bot, which would be done always, and not just when receiving messages.
Let's send a message at a certain time. Well, you probably understand such global checks.
PS Sorry for the very badly worded question
Answer the question
In order to leave comments, you need to log in
Through loop.create_task() you create a long-lived coroutine that spins in the view loop
async def my_long_task():
while True:
await do_stuff() # выполняешь нужные действия, например, проверяешь очередь сообщений для отправки
await asyncio.sleep(60) # спишь минуту
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question