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