- Integrated new command modules for managing giveaways, tickets, self-roles, tags, starboard, suggestions, and birthdays, enhancing the bot's capabilities. - Implemented job handling for giveaway endings, ticket management, and birthday role expirations, improving automation and user experience. - Updated command definitions and interaction handling to support new features, ensuring smooth user interactions. - Enhanced the job processing system with dedicated workers for managing various tasks, including auto-closing tickets and running birthday checks. - Documented the new features and their setup processes in PHASE-TRACKING.md for clarity on implementation steps.
212 lines
8.6 KiB
Markdown
212 lines
8.6 KiB
Markdown
# Nexumi – Phasen-Tracking
|
||
|
||
Dieses Dokument hält den aktuellen Implementierungsstand fest. Es wird bei jedem Arbeitsfortschritt aktualisiert.
|
||
|
||
## Assets
|
||
|
||
- Bot-Logo vorhanden: `docs/logo/nexumi-logo.svg`
|
||
|
||
## Phase 1 – Fundament (Status: abgeschlossen, manuelle Discord-Tests ausstehend)
|
||
|
||
### Bereits abgeschlossen
|
||
|
||
- Monorepo-Basis mit Workspaces:
|
||
- `apps/bot`
|
||
- `packages/shared`
|
||
- Basis-Tooling:
|
||
- TypeScript strict
|
||
- ESLint
|
||
- Prettier
|
||
- Vitest
|
||
- Turbo
|
||
- Docker-Compose-Grundstack:
|
||
- `postgres` mit Healthcheck
|
||
- `redis` mit Healthcheck
|
||
- `bot`
|
||
- `webui`-Scaffold-Service (temporär)
|
||
- `backups` Volume angebunden
|
||
- Prisma-Grundmodell inkl. Moderationsdaten:
|
||
- `Guild`
|
||
- `GuildSettings`
|
||
- `User`
|
||
- `Case`
|
||
- `Warning`
|
||
- `ModNote`
|
||
- `EscalationRule`
|
||
- Bot-Grundarchitektur:
|
||
- Sharding-Startpfad
|
||
- Command-Registrierung
|
||
- Command-Routing
|
||
- zentraler Permission-Check
|
||
- Basis-i18n in `@nexumi/shared`
|
||
- Guild-Locale-Auflösung über DB-Settings mit Fallback auf Env-Default
|
||
- Health-Endpoint (`/health`) und token-geschütztes `/metrics`-Scaffold
|
||
- BullMQ-Integration:
|
||
- Moderation-Queue
|
||
- Temp-Ban-Expire-Job
|
||
- täglicher Backup-Job (`pg_dump`)
|
||
- Backup-Retention-Cleanup
|
||
- Moderation als Referenzmodul (implementiert):
|
||
- `/ban`, `/unban`, `/kick`, `/timeout`, `/untimeout`
|
||
- `/warn add|list|remove|clear`
|
||
- `/warn escalation-set|escalation-list|escalation-remove`
|
||
- `/purge` (Filter: User, Bots, Links, Attachments, Regex)
|
||
- `/slowmode`, `/lock`, `/unlock`
|
||
- `/nick set|reset`
|
||
- `/case view|edit|delete`
|
||
- `/modnote add|list`
|
||
- user-facing Reply-Strings im Moderationsfluss auf i18n-Keys umgestellt (`de`/`en`)
|
||
- Slash-Command-Beschreibungen und Optionstexte lokalisiert (`de` + `en-US` via Discord-Localizations)
|
||
- Bestätigungsflow für destruktive Aktionen (`/ban`, `/purge`, `/case delete`) mit Buttons
|
||
- standardisierte Case-Audit-Metadaten über `@nexumi/shared` (`buildCaseMetadata`)
|
||
- Docker-Build/Runtime-Fixes für E2E:
|
||
- `.dockerignore` ergänzt
|
||
- Prisma-Migration beim Bot-Start (`prisma migrate deploy`)
|
||
- Bot-Healthcheck auf `/health`
|
||
- E2E-Verifikation (automatisiert, lokal):
|
||
- `docker compose up -d --build` erfolgreich
|
||
- Postgres/Redis healthy
|
||
- Migration `20260722123000_init` angewendet
|
||
- Bot online (`Nexumi#9122`), 13 Slash-Commands registriert
|
||
- Bot-Container healthy
|
||
- Tests (aktuell vorhanden):
|
||
- `packages/shared/src/i18n.test.ts`
|
||
- `packages/shared/src/audit.test.ts`
|
||
- `apps/bot/src/modules/moderation/duration.test.ts`
|
||
|
||
### Manuelle Discord-Tests (noch offen)
|
||
|
||
- Bot auf Test-Server einladen (falls noch nicht geschehen)
|
||
- Slash-Commands testen: `/ban`, `/warn add`, `/purge`, `/case view`
|
||
- Bestätigungsbuttons bei `/ban` und `/purge` prüfen
|
||
|
||
## Phase 2 – AutoMod, Logging, Welcome, Verifizierung (Status: implementiert, manuelle Tests ausstehend)
|
||
|
||
### Abgeschlossen
|
||
|
||
- Prisma-Erweiterung + Migration `20260722140000_phase2_modules`:
|
||
- `AutoModConfig`, `AutoModRule`
|
||
- `LoggingConfig`, `LogChannel`
|
||
- `WelcomeConfig`
|
||
- `VerificationConfig`
|
||
- Shared-Schemas und Hilfsfunktionen (`packages/shared/src/phase2.ts`)
|
||
- **AutoMod** (`apps/bot/src/modules/automod/`):
|
||
- Filter: Spam, Massen-Mentions, Caps, Invite-Links, externe Links, Wortfilter, Duplikate, Emoji-Spam, Zalgo, Phishing-Blockliste
|
||
- Standardregeln werden pro Guild beim ersten Zugriff angelegt
|
||
- Anti-Raid (Join-Rate → Lockdown)
|
||
- Anti-Nuke (Massen-Bans/Channel-Löschungen → Rechteentzug)
|
||
- `/automod status`
|
||
- Phishing-Listen-Refresh via BullMQ (alle 6h + beim Start)
|
||
- **Logging** (`apps/bot/src/modules/logging/`):
|
||
- Event-Handler für alle SPEC-Events (Nachrichten, Member, Bans, Rollen, Kanäle, Voice, Invites, Emoji/Sticker, Threads, Guild-Update)
|
||
- Mod-Action-Log verknüpft mit Case-System (`logModAction` in `createCase`)
|
||
- Ignore-Listen (Kanäle, Rollen, Bots) über DB
|
||
- Log-Kanal-Zuordnung über `LogChannel`-Tabelle (Konfiguration künftig WebUI)
|
||
- **Welcome/Leave** (`apps/bot/src/modules/welcome/`):
|
||
- Text-, Embed- und Bild-Karten (Canvas via `@napi-rs/canvas`)
|
||
- Platzhalter-System
|
||
- Autoroles (User/Bots getrennt)
|
||
- Welcome-DM
|
||
- `/welcome test`, `/welcome preview`
|
||
- **Verifizierung** (`apps/bot/src/modules/verification/`):
|
||
- `/verify setup`, `/verify panel`
|
||
- Button-Verify und Captcha-Verify (Captcha-Seite unter `/verify/captcha` am Health-Server)
|
||
- Mindest-Accountalter, Fehlschlag-Aktionen (Kick/Ban/None)
|
||
- Unverified-Rolle bei Join
|
||
- Bot-Intents erweitert:
|
||
- `GuildMembers`, `GuildMessages`, `MessageContent`, `GuildModeration`, `GuildVoiceStates`, `GuildEmojisAndStickers`, `GuildInvites`
|
||
- Neue Env-Variable: `PUBLIC_BASE_URL` (Captcha-Links)
|
||
- Tests: `packages/shared/src/phase2.test.ts`
|
||
|
||
### Manuelle Discord-Tests (noch offen)
|
||
|
||
- **Privileged Intents** im Developer Portal aktivieren:
|
||
- `SERVER MEMBERS INTENT`
|
||
- `MESSAGE CONTENT INTENT`
|
||
- AutoMod: Spam-/Invite-Testnachrichten senden
|
||
- `/automod status` prüfen
|
||
- Logging: Log-Kanäle per DB/ später WebUI setzen, Events auslösen
|
||
- `/welcome preview` und `/welcome test` (Konfiguration zunächst per DB oder später WebUI)
|
||
- `/verify setup` + `/verify panel`, Button- und Captcha-Flow testen
|
||
- `PUBLIC_BASE_URL` auf erreichbare URL setzen (für Captcha außerhalb localhost)
|
||
|
||
### Hinweise
|
||
|
||
- Welcome-/Logging-Konfiguration erfolgt in Phase 2 über die Datenbank; die WebUI-Editoren kommen in Phase 7.
|
||
- Captcha-Seite läuft am Bot-Health-Port (`HEALTH_PORT`); in Produktion muss `PUBLIC_BASE_URL` darauf zeigen oder über Reverse-Proxy geroutet werden.
|
||
|
||
## Phase 3 – Leveling, Economy, Utility, Fun (Status: implementiert, manuelle Tests ausstehend)
|
||
|
||
### Abgeschlossen
|
||
|
||
- Prisma-Migration `20260722150000_phase3_modules`:
|
||
- `LevelingConfig`, `MemberLevel`, `LevelReward`
|
||
- `EconomyConfig`, `MemberEconomy`, `ShopItem`, `InventoryItem`
|
||
- `Poll`, `PollVote`, `Reminder`, `AfkStatus`
|
||
- Shared-Helfer `packages/shared/src/phase3.ts` + Tests
|
||
- Commands und Events in Root verdrahtet (`commands.ts`, `index.ts`)
|
||
|
||
### Leveling (`apps/bot/src/modules/leveling/`)
|
||
|
||
- `/rank` (Canvas-Rankkarte), `/leaderboard`, `/xp give|remove|reset`
|
||
- Text-XP (Cooldown Redis) und Voice-XP
|
||
- Multiplikatoren, No-XP-Kanäle/-Rollen, Level-Rewards, Level-Up CHANNEL/DM/OFF
|
||
|
||
### Economy (`apps/bot/src/modules/economy/`)
|
||
|
||
- `/balance`, `/daily`, `/weekly`, `/work`, `/pay`
|
||
- `/gamble`, `/slots`, `/blackjack` (Buttons), `/coinflip` (Wette)
|
||
- `/shop view|buy`, `/inventory`, `/eco leaderboard|give|remove|reset`
|
||
- Währung pro Server in `EconomyConfig`
|
||
|
||
### Utility (`apps/bot/src/modules/utility/`)
|
||
|
||
- `/userinfo`, `/serverinfo`, `/roleinfo`, `/channelinfo`, `/avatar`, `/banner`
|
||
- `/poll create` (Buttons, DB, Ablauf via BullMQ)
|
||
- `/remindme`, `/reminders list|delete` (BullMQ)
|
||
- `/afk set`, `/emoji add|remove|steal`, `/sticker add`, `/timestamp`
|
||
- Context-Menu **Translate**, `/snipe`, `/editsnipe`, `/embed builder`
|
||
|
||
### Fun (`apps/bot/src/modules/fun/`)
|
||
|
||
- `/8ball`, `/dice`, `/flip` (freier Münzwurf; Economy behält `/coinflip`)
|
||
- `/rps`, `/choose`, `/trivia`, `/tictactoe`, `/connect4`, `/hangman`
|
||
- `/meme`, `/cat`, `/dog` (abschaltbar via Redis `fun:config:{guildId}`)
|
||
|
||
### Manuelle Discord-Tests (Phase 3 – bestätigt)
|
||
|
||
- Manuell auf Test-Server bestätigt (User-Freigabe).
|
||
|
||
## Phase 4 – Giveaways, Tickets, Selfroles, Tags, Starboard, Suggestions, Birthdays, Temp-Voice (Status: implementiert, manuelle 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`
|
||
|
||
### 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 |
|
||
|
||
### Manuelle Discord-Tests (offen)
|
||
|
||
- Giveaway, Ticket-Flow, Selfroles, Tags, Starboard, Suggestions, Birthday, Temp-Voice
|
||
- `docker compose up -d --build` (Migration + Guild-Command-Sync)
|
||
|
||
## Nächster geplanter Schritt
|
||
|
||
- Manuelle Phase-4-Tests, dann nach Freigabe Phase 5 (Statistiken/Invite-Tracking, Social-Feeds, Scheduler, Backup).
|
||
|