From 6232fc04deceb66686c77387fa6e37d221f6c286 Mon Sep 17 00:00:00 2001 From: Hipstercat Date: Tue, 1 Sep 2020 01:14:47 +0200 Subject: [PATCH] fix --- cogs/wynncraft/wynncraftcog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/wynncraft/wynncraftcog.py b/cogs/wynncraft/wynncraftcog.py index 6fc009e..aba093e 100644 --- a/cogs/wynncraft/wynncraftcog.py +++ b/cogs/wynncraft/wynncraftcog.py @@ -184,7 +184,7 @@ class WynncraftCog(commands.Cog): await self._log("Add role: %s" % class_role) await discord_member.add_roles(class_role) - roles_to_remove = list(filter(lambda role: role.id in roles_classes and role.id != class_role_id, discord_member.roles)) + roles_to_remove = list(filter(lambda role: role.id in list(roles_classes.values()) and role.id != class_role_id, discord_member.roles)) if roles_to_remove: await self._log("remove roles: %s" % roles_to_remove) await discord_member.remove_roles(*roles_to_remove)