write
This commit is contained in:
parent
1db2cf35f6
commit
c82f6668aa
@ -151,11 +151,11 @@ class WynncraftCog(commands.Cog):
|
|||||||
combat_role = guild.get_role(combat_role_id)
|
combat_role = guild.get_role(combat_role_id)
|
||||||
if combat_role not in discord_member.roles:
|
if combat_role not in discord_member.roles:
|
||||||
await self._log("Add role: %s" % combat_role)
|
await self._log("Add role: %s" % combat_role)
|
||||||
# await discord_member.add_roles(combat_role)
|
await discord_member.add_roles(combat_role)
|
||||||
|
|
||||||
roles_to_remove = filter(lambda role: role.id in roles_combat_level and role.id != combat_role_id, discord_member.roles)
|
roles_to_remove = filter(lambda role: role.id in roles_combat_level and role.id != combat_role_id, discord_member.roles)
|
||||||
if roles_to_remove:
|
if roles_to_remove:
|
||||||
# await discord_member.remove_roles(roles_to_remove)
|
await discord_member.remove_roles(roles_to_remove)
|
||||||
await self._log("remove roles: %s" % roles_to_remove)
|
await self._log("remove roles: %s" % roles_to_remove)
|
||||||
else:
|
else:
|
||||||
await self._log("max_combat_lvl_class: %s, discord_member: %s (name: %s)" % (max_combat_lvl_class, discord_member, member_name))
|
await self._log("max_combat_lvl_class: %s, discord_member: %s (name: %s)" % (max_combat_lvl_class, discord_member, member_name))
|
||||||
|
Loading…
Reference in New Issue
Block a user