fix
This commit is contained in:
parent
bca6e5639c
commit
26195846e3
@ -276,7 +276,7 @@ class WynncraftCog(commands.Cog):
|
|||||||
await discord_member.add_roles(*roles_to_add)
|
await discord_member.add_roles(*roles_to_add)
|
||||||
|
|
||||||
all_prof_ids = list(itertools.chain.from_iterable([roles_professions[b] for b in roles_professions]))
|
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:
|
if roles_to_remove:
|
||||||
await self._log("remove roles: %s" % roles_to_remove)
|
await self._log("remove roles: %s" % roles_to_remove)
|
||||||
await discord_member.remove_roles(*roles_to_remove)
|
await discord_member.remove_roles(*roles_to_remove)
|
||||||
|
Loading…
Reference in New Issue
Block a user