diff --git a/cogs/wynncraft/wynncraftcog.py b/cogs/wynncraft/wynncraftcog.py index 780d50a..7d9311c 100644 --- a/cogs/wynncraft/wynncraftcog.py +++ b/cogs/wynncraft/wynncraftcog.py @@ -276,7 +276,7 @@ class WynncraftCog(commands.Cog): await discord_member.add_roles(*roles_to_add) all_prof_ids = list(itertools.chain.from_iterable([roles_professions[b] for b in roles_professions])) - roles_to_remove = list(filter(lambda role: role.id in all_prof_ids and role.id not in role_id_to_add, discord_member.roles)) + roles_to_remove = list(filter(lambda role: role.id in all_prof_ids and role.id not in role_ids_to_add, discord_member.roles)) if roles_to_remove: await self._log("remove roles: %s" % roles_to_remove) await discord_member.remove_roles(*roles_to_remove)