Pavel_Duron
78759e9a8a
All checks were successful
continuous-integration/drone/push Build is passing
12 lines
470 B
Python
12 lines
470 B
Python
from aiogram import types, Dispatcher
|
|
from create_bot import bot, dp
|
|
from sqdb import user, session
|
|
|
|
@dp.message_handler(commands=['alarm'])
|
|
async def notify_chats(message: types.Message):
|
|
for chats in session.query(user.chat_id).distinct():
|
|
session.close()
|
|
await bot.send_message(chats,'<b>Ведутся пажилые работы,\n Ожидайте...</b>')
|
|
|
|
def register_handlers_alarm(dp: Dispatcher):
|
|
dp.register_message_handler(notify_chats) |