From 1c320b5e6e1dc848b59b770d3e778d19d1517727 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Tue, 24 Apr 2018 17:55:47 -0500 Subject: [PATCH] Don't show colour roles in list --- cogs/roles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/roles.py b/cogs/roles.py index d6ea28b..8c05025 100644 --- a/cogs/roles.py +++ b/cogs/roles.py @@ -70,8 +70,10 @@ class Roles: EXAMPLE: !role RESULT: A list of all your roles""" + # Don't include the colour roles + colour_role = re.compile("Bonfire #.+") # Simply get a list of all roles in this server and send them - entries = [r.name for r in ctx.guild.role_hierarchy[:-1]] + entries = [r.name for r in ctx.guild.role_hierarchy[:-1] if not colour_role.match(r.name)] if len(entries) == 0: await ctx.send("You do not have any roles setup on this server, other than the default role!") return