Merge branch 'main' of https://git.guaranteedstruggle.host/Pavel_Durov/python_bot
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Durov 2023-07-20 23:13:36 +03:00
commit 50504b14ce

View File

@ -213,13 +213,14 @@ async def send_global_top(message: types.Message):
try:
dicks = dicks_collection.all( )
dicks = [d for d in dicks]
dicks = [d for d in dicks if d['user_id'] != d['chat_id']]
except Exception as e:
print('ошибка DB в /glovaldick')
print(e)
top_dicks = sorted(dicks, key=lambda dick: dick['dick_size'], reverse=True)
dick_limit = min(len(top_dicks), 10)
top_dicks = top_dicks[:dick_limit]