1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Sort brawlhalla duos by rating

This commit is contained in:
Steffo 2020-07-18 01:38:10 +02:00
parent 916dcbad23
commit 22d534f3e8
Signed by: steffo
GPG key ID: 896A80F55F7C97F0

View file

@ -155,7 +155,7 @@ class BrawlhallaCommand(LinkerCommand):
if len(bh.duos) != 0: if len(bh.duos) != 0:
string.append(f"👥 [b]2v2[/b]") string.append(f"👥 [b]2v2[/b]")
for duo in bh.duos: for duo in sorted(bh.duos, key=lambda d: -d.rating_2v2):
other = duo.other(bh) other = duo.other(bh)
string.append(f"Con [b]{other.steam.user}[/b]: [b]{duo.rank_2v2}[/b] ({duo.rating_2v2} MMR)") string.append(f"Con [b]{other.steam.user}[/b]: [b]{duo.rank_2v2}[/b] ({duo.rating_2v2} MMR)")