Implement warning system enhancements with unique identifiers

- Added a `warningNumber` field to the `Warning` model for sequential identification of warnings.
- Updated the `createWarning` function to handle the new `warningNumber` logic and notify users via DM upon receiving a warning.
- Refactored moderation commands to utilize the new warning system, including changes to the warning creation and removal processes.
- Enhanced the WebUI to display warning numbers in the warnings table and updated localization for related messages.
- Documented changes in phase tracking to reflect the new warning system features.
This commit is contained in:
TheOnlyMace
2026-07-25 17:31:28 +02:00
parent 061e287390
commit 2058713e03
14 changed files with 218 additions and 52 deletions

View File

@@ -617,3 +617,20 @@
- [ ] Alten Cron-Eintrag (jobId `repeat:…`) im Dashboard löschen → kein API-Error -8
- [ ] Dark Mode: Cron-Feld und datetime-local lesbar/bedienbar
## Post-Phase Warn-DM + kurze Warnungsnummern (Status: implementiert)
### Abgeschlossen (Code)
- Verwarnte Nutzer erhalten eine DM mit Servername, Grund, aktueller Warnungsanzahl und Nr.
- Pro Guild sequenzielle kurze `warningNumber` (wie Case-Nummern); `/warn list` und Dashboard zeigen `#N`
- `/warn remove` akzeptiert Integer-Option `id` statt langer CUID
- Gemeinsame `createWarning`-Hilfe (Slash + AutoMod), Migration `20260725180000_warning_number`
### Manuell testen
- [ ] `/warn add` → Moderator sieht `#N`; Ziel-User erhält DM (Server, Grund, Count)
- [ ] User mit geschlossenen DMs → Warn trotzdem gespeichert, Bot-Log warnt
- [ ] `/warn list` zeigt `#1`, `#2`, …; `/warn remove id:1` entfernt korrekt
- [ ] AutoMod-WARN → ebenfalls DM + Case verknüpft
- [ ] Dashboard: Warn-Tabelle zeigt `#`-Spalte