forked from Pavel_Durov/python_bot
fix session
This commit is contained in:
parent
e748ee3913
commit
c0e0b51dee
5
bot.py
5
bot.py
@ -167,7 +167,8 @@ async def send_topchat(message: types.Message):
|
|||||||
async def send_time(message: types.Message):
|
async def send_time(message: types.Message):
|
||||||
with session:
|
with session:
|
||||||
top_chat = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).limit(10).all()
|
top_chat = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).limit(10).all()
|
||||||
delimiter = ': '
|
|
||||||
|
delimiter = ': '
|
||||||
|
|
||||||
|
|
||||||
await bot.send_message(message.chat.id, f'🏆Топ 10 пипис в мире🏆\n\n\
|
await bot.send_message(message.chat.id, f'🏆Топ 10 пипис в мире🏆\n\n\
|
||||||
@ -181,7 +182,7 @@ async def send_time(message: types.Message):
|
|||||||
8. {delimiter.join(map(str, top_chat[7]))}\n\
|
8. {delimiter.join(map(str, top_chat[7]))}\n\
|
||||||
9. {delimiter.join(map(str, top_chat[8]))}\n\
|
9. {delimiter.join(map(str, top_chat[8]))}\n\
|
||||||
10. {delimiter.join(map(str, top_chat[9]))}\n')
|
10. {delimiter.join(map(str, top_chat[9]))}\n')
|
||||||
|
session.close()
|
||||||
|
|
||||||
@dp.message_handler(commands=['start'])
|
@dp.message_handler(commands=['start'])
|
||||||
async def start_func(message: types.Message):
|
async def start_func(message: types.Message):
|
||||||
|
Loading…
Reference in New Issue
Block a user