I
I
Ilya2021-12-06 20:20:01
Python
Ilya, 2021-12-06 20:20:01

How to send messages periodically in Aiogram?

Greetings, I have a message,
*You received a message*
And there is a command in the Telegram bot - notifications

I would like the message to be sent once an hour, I want everything to be asynchronous so that the user can use other functions of the bot, my code

@dispatcher.message_handler(commands=['notifications'])
async def notifications(message: types.Message):
#cooldown
await message.answer('*Ты получил сообщение*')


Would be any help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question