typing issues

This commit is contained in:
brandons209 2020-08-24 13:51:15 -04:00
parent e3afe10299
commit 4050e7c3e2
2 changed files with 2 additions and 3 deletions

View file

@ -972,7 +972,6 @@ class RoleManagement(
msg += f"You need one of these roles in order to get this role: {humanize_list(roles)}\n"
await ctx.send(msg)
except ConflictingRoleException as e:
print(e.conflicts)
roles = [r.name for r in ctx.guild.roles if r in e.conflicts]
plural = "are" if len(roles) > 1 else "is"
await ctx.send(

View file

@ -174,10 +174,10 @@ class UtilMixin(MixinMeta):
ex = []
for ex_roles in ex_data:
ex.extend(ex_roles)
conflicts: List[int] = [r.id for r in who.roles if r.id in ex]
conflicts: List[discord.Role] = [r for r in who.roles if r.id in ex]
for r in conflicts:
if not data.get(r, {}).get("self_removable", False):
if not data.get(r.id, {}).get("self_removable", False):
raise ConflictingRoleException(conflicts=conflicts)
return conflicts