diff options
| author | 2020-02-06 21:44:56 +0100 | |
|---|---|---|
| committer | 2020-02-06 21:44:56 +0100 | |
| commit | debe73add8bf5c5f9b33e32201f1ce212758c8e4 (patch) | |
| tree | 3bb825783f7d25f3c59efc72b01f37ea96a6e59e | |
| parent | Merge pull request #737 from python-discord/remove-prometheus (diff) | |
No longer check if every role is @everyone; just skip the first element in the list
| -rw-r--r-- | bot/cogs/information.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/cogs/information.py b/bot/cogs/information.py index 125d7ce24..bc2deae8f 100644 --- a/bot/cogs/information.py +++ b/bot/cogs/information.py @@ -32,8 +32,7 @@ class Information(Cog): async def roles_info(self, ctx: Context) -> None: """Returns a list of all roles and their corresponding IDs.""" # Sort the roles alphabetically and remove the @everyone role - roles = sorted(ctx.guild.roles, key=lambda role: role.name) - roles = [role for role in roles if role.name != "@everyone"] + roles = sorted(ctx.guild.roles[1:], key=lambda role: role.name) # Build a string role_string = "" @@ -202,7 +201,7 @@ class Information(Cog): name = f"{user.nick} ({name})" joined = time_since(user.joined_at, precision="days") - roles = ", ".join(role.mention for role in user.roles if role.name != "@everyone") + roles = ", ".join(role.mention for role in user.roles[1:]) description = [ textwrap.dedent(f""" |