From 9cbe80b9ed81879ae3400d196bc32f89eb9b910a Mon Sep 17 00:00:00 2001 From: Pavel_Duron Date: Tue, 6 Dec 2022 20:31:55 +1000 Subject: [PATCH] add alarm of job fix --- handlers/coding.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/coding.py b/handlers/coding.py index 07cbfc9..c83e833 100644 --- a/handlers/coding.py +++ b/handlers/coding.py @@ -3,10 +3,11 @@ from create_bot import bot, dp from sqdb import user, session @dp.message_handler(commands=['alarm']) -async def notify_chats(message: types.Message): +async def notify_chats(): for chats in session.query(user.chat_id).distinct(): session.close() - await bot.send_message(chats,'Ведутся пажилые работы,\n Ожидайте...') + await bot.send_message(chats,'Ведутся пажилые работы,\n Ожидайте...') + await bot.send_message(226765676, 'рассылка завершена') def register_handlers_alarm(dp: Dispatcher): dp.register_message_handler(notify_chats) \ No newline at end of file