Skip to content

Commit

Permalink
[Mod] add role mentions to userinfo and reverse role sorting (#2759)
Browse files Browse the repository at this point in the history
* add role mentions to userinfo and reverse role sorting

This small PR adds the role mentions to userinfo and reverses the sorting so that the top most role of a user is at the left of the embed

* Remove sorting as it's handled by d.py
  • Loading branch information
kennnyshiwa authored and Michael H committed Jun 24, 2019
1 parent 870b615 commit 52f5d5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redbot/cogs/mod/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def userinfo(self, ctx, *, user: discord.Member = None):
special_date = datetime(2016, 1, 10, 6, 8, 4, 443000)
is_special = user.id == 96130341705637888 and guild.id == 133049272517001216

roles = sorted(user.roles)[1:]
roles = user.roles[-1:0:-1]
names, nicks = await self.get_names_and_nicks(user)

joined_at = user.joined_at if not is_special else special_date
Expand Down Expand Up @@ -125,7 +125,7 @@ async def userinfo(self, ctx, *, user: discord.Member = None):
activity = _("Watching {}").format(user.activity.name)

if roles:
roles = ", ".join([x.name for x in roles])
roles = ", ".join([x.mention for x in roles])
else:
roles = None

Expand Down

0 comments on commit 52f5d5c

Please sign in to comment.