Improved level service

This commit is contained in:
Sven Heidemann 2023-03-30 14:23:29 +02:00
parent 91034cee09
commit 1960b18058

View File

@ -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)