Make Roles totally ordered.

This also fixes a bug with Member.top_role that chose the wrong role
should they have the same position.
This commit is contained in:
Rapptz
2016-09-21 03:53:24 -04:00
parent 09e77e548a
commit 13f85b3292
2 changed files with 50 additions and 12 deletions

View File

@ -197,6 +197,6 @@ class Member(User):
"""
if self.roles:
roles = sorted(self.roles, key=lambda r: r.position, reverse=True)
roles = sorted(self.roles, reverse=True)
return roles[0]
return None