forked from Pavel_Durov/python_bot
parent
71b87a97ff
commit
1215937856
1
othersq/__init__.py
Normal file
1
othersq/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from othersq import sendnot
|
@ -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)
|
||||
def register_handlers_sendnotal(dp: Dispatcher):
|
||||
dp.register_message_handler(sendall)
|
Loading…
Reference in New Issue
Block a user