Compare commits

..

2 Commits

Author SHA1 Message Date
Simple_Not
4e128198b7 Merge branch 'main' of https://git.guaranteedstruggle.host/Pavel_Durov/python_bot
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-20 16:10:27 +10:00
Simple_Not
0cf7423806 fix /golbal 2023-07-20 16:09:27 +10:00

View File

@ -213,13 +213,14 @@ async def send_global_top(message: types.Message):
try: try:
dicks = dicks_collection.all( ) 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: except Exception as e:
print('ошибка DB в /glovaldick') print('ошибка DB в /glovaldick')
print(e) print(e)
top_dicks = sorted(dicks, key=lambda dick: dick['dick_size'], reverse=True) top_dicks = sorted(dicks, key=lambda dick: dick['dick_size'], reverse=True)
dick_limit = min(len(top_dicks), 10) dick_limit = min(len(top_dicks), 10)
top_dicks = top_dicks[:dick_limit] top_dicks = top_dicks[:dick_limit]