#7 убирац
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not
2024-01-21 22:02:22 +10:00
parent bb91a90e9e
commit b188edd98d
3 changed files with 2 additions and 64 deletions

View File

@@ -1,5 +1,4 @@
from aiogram import types, Dispatcher
#from sqlalchemy.orm.session import close_all_sessions
from create_bot import bot, dp
#from sqdb import user, session
import random

View File

@@ -1,9 +1,6 @@
from create_bot import dp, bot
from aiogram import types, Dispatcher
from sqdb import user, session
@dp.message_handler(commands=['sendall'])
async def sendall(message: types.Message):
@@ -19,10 +16,8 @@ async def sendall(message: types.Message):
except:
print('вероятно бота нет в чате')
await bot.send_message(message.from_user.id, 'Сообщение успешно отправлено во все чаты')
except:
session.rollback()
print('eror sendall')
finally: session.close_all()
except:
print('eror sendall')
# def register_handlers_test(dp: Dispatcher):