Compare commits
3 Commits
4d386759c0
...
31c62b4108
Author | SHA1 | Date | |
---|---|---|---|
31c62b4108 | |||
b0990b626c | |||
df9c889c7e |
@ -92,11 +92,8 @@ 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
|
||||
user.xp = 0
|
||||
self._users.update_user(user)
|
||||
self._db.save_changes()
|
||||
await self.notify_user(member, self._t.transform("modules.base.warnings.third"))
|
||||
|
@ -183,6 +183,7 @@ export class UserWarningComponent extends ComponentWithTable implements OnInit,
|
||||
}
|
||||
|
||||
this.updateUserByWarning(newUserWarning.user?.id ?? 0, this.userWarnings.filter(uw => uw.user?.id == newUserWarning.user?.id));
|
||||
this.isEditingNew = false;
|
||||
}
|
||||
|
||||
public onRowEditCancel(index: number): void {
|
||||
|
@ -374,6 +374,12 @@
|
||||
"save": "Speichern",
|
||||
"wrong_password": "Falsches Passwort"
|
||||
},
|
||||
"change_password": {
|
||||
"message": {
|
||||
"error": "Fehler",
|
||||
"password_cannot_be_changed": "Passwort konnte nicht geändert werden"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"filter": {
|
||||
"name": "Name"
|
||||
|
@ -374,6 +374,12 @@
|
||||
"save": "Save",
|
||||
"wrong_password": "Wrong password"
|
||||
},
|
||||
"change_password": {
|
||||
"message": {
|
||||
"error": "Error",
|
||||
"password_cannot_be_changed": "Password change failed"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"filter": {
|
||||
"name": "Name"
|
||||
|
Loading…
Reference in New Issue
Block a user