From 22d534f3e8511c703d40469f9c43c092511e9370 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 18 Jul 2020 01:38:10 +0200 Subject: [PATCH] Sort brawlhalla duos by rating --- royalpack/commands/brawlhalla.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/royalpack/commands/brawlhalla.py b/royalpack/commands/brawlhalla.py index 1d1219db..e2a7e142 100644 --- a/royalpack/commands/brawlhalla.py +++ b/royalpack/commands/brawlhalla.py @@ -155,7 +155,7 @@ class BrawlhallaCommand(LinkerCommand): if len(bh.duos) != 0: 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) string.append(f"Con [b]{other.steam.user}[/b]: [b]{duo.rank_2v2}[/b] ({duo.rating_2v2} MMR)")