Improved level service
This commit is contained in:
parent
91034cee09
commit
1960b18058
@ -58,10 +58,7 @@ class LevelService:
|
|||||||
return
|
return
|
||||||
|
|
||||||
notification_needed = False
|
notification_needed = False
|
||||||
for role in member.roles:
|
for role in member.roles.where(lambda r: r.name in level_names.to_list()):
|
||||||
if role.name not in level_names.to_list():
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._logger.debug(__name__, f"Try to remove role {role.name} from {member.name}")
|
self._logger.debug(__name__, f"Try to remove role {role.name} from {member.name}")
|
||||||
await member.remove_roles(role)
|
await member.remove_roles(role)
|
||||||
|
Loading…
Reference in New Issue
Block a user