From 4050e7c3e253b646e83be2afa990a6d6e5d4cbb8 Mon Sep 17 00:00:00 2001 From: brandons209 Date: Mon, 24 Aug 2020 13:51:15 -0400 Subject: [PATCH] typing issues --- rolemanagement/core.py | 1 - rolemanagement/utils.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rolemanagement/core.py b/rolemanagement/core.py index 9c27942..04e2a81 100644 --- a/rolemanagement/core.py +++ b/rolemanagement/core.py @@ -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( diff --git a/rolemanagement/utils.py b/rolemanagement/utils.py index 2b86008..6e3e606 100644 --- a/rolemanagement/utils.py +++ b/rolemanagement/utils.py @@ -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