aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ben Soyka <[email protected]>2021-04-04 12:47:07 -0600
committerGravatar Ben Soyka <[email protected]>2021-04-04 12:47:07 -0600
commit6a7325c5f7fe32787fe5cb94ef4a3c35a0474d60 (patch)
treef59501959b4db8956b7d15416190f3861fcddc96
parentMerge pull request #1497 from python-discord/mbaruh-staff_info (diff)
Ignore colourless roles in !user embed
-rw-r--r--bot/exts/info/information.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 0555544ce..a8844fe29 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -284,7 +284,9 @@ class Information(Cog):
embed.add_field(name=field_name, value=field_content, inline=False)
embed.set_thumbnail(url=user.avatar_url_as(static_format="png"))
- embed.colour = user.top_role.colour if roles else Colour.blurple()
+
+ role_colours = [role.colour for role in user.roles[1:] if role.colour != Colour.default()]
+ embed.colour = role_colours[-1] if role_colours else Colour.blurple()
return embed