fix session

This commit is contained in:
Pavel_Duron 2022-12-04 17:05:35 +10:00
parent 0861e266c7
commit cc4549d598

8
bot.py
View File

@ -158,11 +158,11 @@ async def send_topchat(message: types.Message):
@dp.message_handler(commands=["globaldick"])
async def send_time(message: types.Message):
with session:
top_chat = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).limit(10).all()
delimiter = ': '
top_chat = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).limit(10).all()
delimiter = ': '
session.close()
engine.dispose()
await bot.send_message(message.chat.id, f'🏆Топ 10 пипис в мире🏆\n\n\
1. {delimiter.join(map(str, top_chat[0]))}\n\
2. {delimiter.join(map(str, top_chat[1]))}\n\