Small refactoring

pull/123/head
bobloy 4 years ago
parent dcf1c85ebc
commit 67e7c3bae8

@ -89,7 +89,7 @@ class ExclusiveRole(Cog):
to_remove = (member_set - role_set) - {member.guild.default_role.id} to_remove = (member_set - role_set) - {member.guild.default_role.id}
if to_remove and member_set & role_set: if to_remove and member_set & role_set:
to_remove = [discord.utils.get(member.guild.roles, id=id) for id in to_remove] to_remove = [discord.utils.get(member.guild.roles, id=r_id) for r_id in to_remove]
await member.remove_roles(*to_remove, reason="Exclusive roles") await member.remove_roles(*to_remove, reason="Exclusive roles")
@commands.Cog.listener() @commands.Cog.listener()

Loading…
Cancel
Save