diff --git a/bot/src/modules/base/service/user_warnings_service.py b/bot/src/modules/base/service/user_warnings_service.py index 125b82a2..7eaa8141 100644 --- a/bot/src/modules/base/service/user_warnings_service.py +++ b/bot/src/modules/base/service/user_warnings_service.py @@ -92,13 +92,10 @@ class UserWarningsService: elif existing_warnings.count() == 3: server = self._servers.get_server_by_discord_id(member.guild.id) user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id) - levels = self._levels.get_levels_by_server_id(server.id) - new_level = levels.where(lambda l: l.min_xp > 0).order_by(lambda l: l.min_xp).last_or_default() - if new_level is not None: - user.xp = new_level.min_xp - self._users.update_user(user) - self._db.save_changes() + user.xp = 0 + self._users.update_user(user) + self._db.save_changes() await self.notify_user(member, self._t.transform("modules.base.warnings.third")) elif existing_warnings.count() >= 4: