From 1215937856a71b2e619a1fbe7fb40f786e624159 Mon Sep 17 00:00:00 2001 From: Pavel_Durov Date: Sun, 11 Dec 2022 01:21:07 -0500 Subject: [PATCH] revert 71b87a97ff907748beb8d27eb7591144d402df38 revert change imports --- othersq/__init__.py | 1 + handlers/sendalarm.py => othersq/sendnot.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 othersq/__init__.py rename handlers/sendalarm.py => othersq/sendnot.py (86%) diff --git a/othersq/__init__.py b/othersq/__init__.py new file mode 100644 index 0000000..bf46e75 --- /dev/null +++ b/othersq/__init__.py @@ -0,0 +1 @@ +from othersq import sendnot \ No newline at end of file diff --git a/handlers/sendalarm.py b/othersq/sendnot.py similarity index 86% rename from handlers/sendalarm.py rename to othersq/sendnot.py index d03417e..26d5a44 100644 --- a/handlers/sendalarm.py +++ b/othersq/sendnot.py @@ -1,11 +1,12 @@ + from aiogram import types, Dispatcher from sqdb import session, user from create_bot import bot, dp @dp.message_handler(commands=['sendall']) -async def sendalarm(message: types.Message): +async def sendall(message: types.Message): print('начал работать') if message.chat.type == 'private': if message.from_user.id == 226765676: @@ -23,6 +24,5 @@ async def sendalarm(message: types.Message): print('eror sendall') finally: session.close_all() - -def register_handlers_sendalarm(dp: Dispatcher): - dp.register_message_handler(sendalarm) \ No newline at end of file +def register_handlers_sendnotal(dp: Dispatcher): + dp.register_message_handler(sendall) \ No newline at end of file