Files
Papo/readme.md
2025-11-30 11:04:41 +01:00

37 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Papo Discord Bot (TypeScript)
Discord v14 Bot mit Slash Commands, Ticket-System, Musikplayer, Automod und Web-Dashboard (Express + OAuth2 Scaffold).
## Setup
1. `npm install`
2. `.env` aus `.env.example` kopieren und Werte setzen (einzelne Guild via `DISCORD_GUILD_ID`, mehrere via `DISCORD_GUILD_IDS` als Kommaliste oder global ohne Angabe)
3. Prisma Schema anpassen und generieren (optional DB): `npx prisma generate`
4. Entwicklung: `npm run dev`
5. Build: `npm run build` und `npm start`
## Struktur
- `src/index.ts` Bootstrap für Bot + Webserver
- `src/commands` Slash Commands (Admin, Music, Tickets, Utility)
- `src/events` Event-Handler (ready, interaction, message, member join/leave, bans)
- `src/services` Automod, Logging, Music-Queue, Tickets, Forum-Stubs, Leveling
- `src/web` Express-Server mit OAuth2-Routen und Dashboard-Stubs
- `src/database` Prisma Schema + Client
## Features (Stand Scaffold)
- Admin: /ban /tempban /kick /mute /unmute /timeout /clear (+ Logging)
- Automod: Anti-Link & Spam Timeout
- Logging: Join/Leave, Edit/Delete, Moderations
- Welcome-System: via `/configure welcome_channel`
- Leveling: optional via `/configure leveling true`, Anzeige mit `/rank`
- Musik: /play /pause /resume /skip /stop /queue /loop (YouTube via play-dl)
- Tickets: /ticket /claim /close, Ticket-Panel mit Buttons via `/ticketpanel`, Claim/Close/Transcript Buttons im Kanal, Prioritäten via `/ticketpriority`, Status via `/ticketstatus`, Transcript-Export via `/transcript`, Channel pro User, Transcript-Export (TXT), Prisma Modell
- Forum-Integration: Service mit Interfaces/Stubs
- Web-Dashboard: Express mit OAuth2-Stubs, Live-Übersicht & Settings API (/api/overview, /api/tickets, /api/settings) + UI
- Multi-Guild: Commands registrieren automatisch für alle IDs in `DISCORD_GUILD_IDS` oder global, Auto-Register bei Guild-Join
## Hinweise
- Commands werden beim Start automatisch per REST im angegebenen Guild registriert.
- Musik benötigt Voice-Berechtigungen und Zugang zum Voice-Channel des Nutzers.
- Transcript-Dateien landen unter `./transcripts`.
- Das Dashboard ist bewusst minimal als Ausgangspunkt für weitere UI/Frontend-Integration.