Compare commits
2 Commits
28d0e6fdbf
...
4e128198b7
Author | SHA1 | Date | |
---|---|---|---|
|
4e128198b7 | ||
|
0cf7423806 |
@ -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]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user