Add stats, feeds, scheduler, and guild backup features to the bot

- Introduced new models in the Prisma schema for statistics, social feeds, scheduled messages, and guild backups, enhancing the bot's functionality.
- Implemented command modules for managing stats channels, feeds, scheduling messages, and creating/restoring backups, improving user engagement and server management.
- Updated job handling to include dedicated workers for stats updates, feed polling, scheduling, and backup restoration, enhancing automation.
- Enhanced command localization for new features in both German and English.
- Documented the new features and their setup processes in PHASE-TRACKING.md for clarity on implementation steps.
This commit is contained in:
smueller
2026-07-22 13:36:39 +02:00
parent 52b10c9536
commit 12066befa8
36 changed files with 4032 additions and 42 deletions

View File

@@ -177,35 +177,38 @@ Dieses Dokument hält den aktuellen Implementierungsstand fest. Es wird bei jede
- Manuell auf Test-Server bestätigt (User-Freigabe).
## Phase 4 Giveaways, Tickets, Selfroles, Tags, Starboard, Suggestions, Birthdays, Temp-Voice (Status: implementiert, manuelle Tests ausstehend)
## Phase 4 Giveaways … Temp-Voice (Status: abgeschlossen, manuell bestätigt)
- Manuell auf Test-Server bestätigt (User-Freigabe).
## Phase 5 Stats/Invites, Feeds, Scheduler, Guild-Backup (Status: implementiert + deployed, manuelle Discord-Tests ausstehend)
### Abgeschlossen
- Prisma-Migration `20260722160000_phase4_modules`
- Shared `packages/shared/src/phase4.ts` + Tests
- Alle Module in `commands.ts` / `index.ts` / `jobs.ts` verdrahtet
- Intents: `GuildMessageReactions`; Partials: `Reaction`
- Queues: `giveaways`, `tickets` (inkl. SelfRole-Expire + Auto-Close), `birthdays`
- Prisma-Migration `20260722170000_phase5_modules` (deployed)
- Shared `packages/shared/src/phase5.ts` + Tests
- Module verdrahtet in `commands.ts`, `index.ts`, `jobs.ts`
- Queues/Worker: `stats`, `feeds`, `schedules`, `guild-backups`
- Optional: `TWITCH_CLIENT_ID` / `TWITCH_CLIENT_SECRET`
- E2E: `docker compose up -d --build bot` OK; Bot ready; 74 Guild-Commands registriert
### Module
| Modul | Features |
|--------|----------|
| **Giveaways** | `/giveaway start\|end\|reroll\|list\|delete\|pause`, Join-Button, Auto-End |
| **Tickets** | Panel/Kategorie, Close/Claim/…, HTML-Transkript, Rating, Auto-Close |
| **Selfroles** | Panel create/edit/delete (Buttons/Dropdown/Reactions + Behaviors) |
| **Tags** | create/edit/delete/list/info/run, Auto-Responder |
| **Starboard** | `/starboard setup`, Reaction-Events |
| **Suggestions** | `/suggest`, Staff-Status, Voting-Buttons |
| **Birthdays** | set/remove/next/list/setup, stündlicher Check, 24h-Rolle |
| **Temp-Voice** | setup + Steuerung + Join-to-Create + Control-Panel |
| **Stats/Invites** | `/stats setup\|refresh`, `/invites view\|leaderboard`, Invite-Tracking, ActivityStat, 10-Min-Kanal-Update |
| **Feeds** | `/feeds add\|remove\|list\|test` (Twitch/YouTube/RSS/Reddit), Poll alle 5 Min |
| **Scheduler** | `/schedule create\|list\|delete`, `/announce`, BullMQ once/cron |
| **Guild-Backup** | `/backup create\|list\|info\|delete\|restore` (Owner + Doppelbestätigung) |
### Manuelle Discord-Tests (offen)
- Giveaway, Ticket-Flow, Selfroles, Tags, Starboard, Suggestions, Birthday, Temp-Voice
- `docker compose up -d --build` (Migration + Guild-Command-Sync)
- `/stats setup` + Kanal-Update; Invite-Join → `/invites view|leaderboard`
- `/feeds add` (RSS/Reddit) + `/feeds test`
- `/schedule create` (once) + `/announce`
- `/backup create|list|info` und Delete/Restore-Bestätigung (Owner)
## Nächster geplanter Schritt
- Manuelle Phase-4-Tests, dann nach Freigabe Phase 5 (Statistiken/Invite-Tracking, Social-Feeds, Scheduler, Backup).
- Manuelle Phase-5-Tests, dann nach Freigabe Phase 6 (WebUI-Fundament: OAuth, Layout, Settings-Framework, API).