Implement self-role panel management with BullMQ integration

- Introduced a new `selfroles` queue to handle self-role panel creation, updates, and deletions via BullMQ jobs.
- Added types for self-role panel jobs, enhancing type safety and clarity in job handling.
- Implemented functions to create, update, and delete self-role panels, ensuring synchronization between the WebUI and Discord.
- Enhanced error handling for self-role panel operations, providing better feedback in case of failures.
- Updated the WebUI API to support self-role panel management, including error responses for synchronization issues.
This commit is contained in:
TheOnlyMace
2026-07-25 15:43:55 +02:00
parent 8513848440
commit ba2d144038
9 changed files with 423 additions and 67 deletions

View File

@@ -426,6 +426,24 @@
- [ ] Cases: Grund editieren / löschen; Warnings entfernen
- [ ] `/lock server:true` und `/unlock server:true`
## Post-Phase Selfroles WebUI → Discord Sync (Status: implementiert)
### Abgeschlossen (Code)
- Root cause: Dashboard speicherte Selfrole-Panels nur in Postgres, ohne BullMQ-Job an den Bot
- Neue Queue `selfroles` mit Jobs `selfRolePanelCreate` / `Update` / `Delete`
- WebUI wartet (bounded) auf Bot-Bestätigung; Panel hat danach `messageId`
- Update zieht fehlende Discord-Nachricht nach (auch für Alt-Panels ohne `messageId`)
- Roles-JSON `{ entries }` wird im Dashboard korrekt gelesen
### Manuell testen
- [ ] WebUI: Panel erstellen → Embed/Buttons erscheinen im gewählten Channel
- [ ] Panel editieren (Titel/Rollen) → Discord-Nachricht aktualisiert sich
- [ ] Channel wechseln → alte Nachricht weg, neue im Zielkanal
- [ ] Panel löschen → Discord-Nachricht entfernt
- [ ] Alt-Panel ohne Message speichern → Nachricht wird nachgezogen
## Nächster geplanter Schritt
- Deploy auf Traefik-Server manuell verifizieren; danach ggf. `deploy``main` mergen (nur auf Freigabe).