diff options
| author | Rapptz <[email protected]> | 2017-06-24 20:55:47 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-06-24 20:55:47 -0400 |
| commit | 723e392c95bc8e9c03104a1a647870725d6d1fe0 (patch) | |
| tree | a96b753acb92f56752085c87e27c34f3fcf05b3f | |
| parent | Fix missing lazy logging format calls. (diff) | |
| download | discord.py-723e392c95bc8e9c03104a1a647870725d6d1fe0.tar.xz discord.py-723e392c95bc8e9c03104a1a647870725d6d1fe0.zip | |
Properly sort roles and discard everyone role in Member.colour.
| -rw-r--r-- | discord/member.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/member.py b/discord/member.py index 7b969869..4226bffe 100644 --- a/discord/member.py +++ b/discord/member.py @@ -238,11 +238,13 @@ class Member(discord.abc.Messageable, _BaseUser): """ default_colour = Colour.default() + roles = self.roles[1:] # remove @everyone + # highest order of the colour is the one that gets rendered. # if the highest is the default colour then the next one with a colour # is chosen instead - if self.roles: - roles = sorted(self.roles, key=lambda r: r.position, reverse=True) + if roles: + roles = sorted(roles, reverse=True) for role in roles: if role.colour == default_colour: continue |