Compare commits

..

No commits in common. "31c62b4108551e91cf571bd1537de390659bddb3" and "4d386759c051efdfa2a2445509574d86a0100ab2" have entirely different histories.

4 changed files with 6 additions and 16 deletions

View File

@ -92,10 +92,13 @@ class UserWarningsService:
elif existing_warnings.count() == 3: elif existing_warnings.count() == 3:
server = self._servers.get_server_by_discord_id(member.guild.id) 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) 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)
user.xp = 0 new_level = levels.where(lambda l: l.min_xp > 0).order_by(lambda l: l.min_xp).last_or_default()
self._users.update_user(user) if new_level is not None:
self._db.save_changes() user.xp = new_level.min_xp
self._users.update_user(user)
self._db.save_changes()
await self.notify_user(member, self._t.transform("modules.base.warnings.third")) await self.notify_user(member, self._t.transform("modules.base.warnings.third"))
elif existing_warnings.count() >= 4: elif existing_warnings.count() >= 4:

View File

@ -183,7 +183,6 @@ export class UserWarningComponent extends ComponentWithTable implements OnInit,
} }
this.updateUserByWarning(newUserWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == newUserWarning.user?.id)); this.updateUserByWarning(newUserWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == newUserWarning.user?.id));
this.isEditingNew = false;
} }
public onRowEditCancel(index: number): void { public onRowEditCancel(index: number): void {

View File

@ -374,12 +374,6 @@
"save": "Speichern", "save": "Speichern",
"wrong_password": "Falsches Passwort" "wrong_password": "Falsches Passwort"
}, },
"change_password": {
"message": {
"error": "Fehler",
"password_cannot_be_changed": "Passwort konnte nicht geändert werden"
}
},
"dashboard": { "dashboard": {
"filter": { "filter": {
"name": "Name" "name": "Name"

View File

@ -374,12 +374,6 @@
"save": "Save", "save": "Save",
"wrong_password": "Wrong password" "wrong_password": "Wrong password"
}, },
"change_password": {
"message": {
"error": "Error",
"password_cannot_be_changed": "Password change failed"
}
},
"dashboard": { "dashboard": {
"filter": { "filter": {
"name": "Name" "name": "Name"