1
0
Fork 0
mirror of synced 2024-05-19 03:52:25 +12:00

Don't show colour roles in list

This commit is contained in:
phxntxm 2018-04-24 17:55:47 -05:00
parent 604e427af4
commit 1c320b5e6e

View file

@ -70,8 +70,10 @@ class Roles:
EXAMPLE: !role EXAMPLE: !role
RESULT: A list of all your roles""" 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 # 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: if len(entries) == 0:
await ctx.send("You do not have any roles setup on this server, other than the default role!") await ctx.send("You do not have any roles setup on this server, other than the default role!")
return return