Add GSM API documentation for Discord updates and non-RCON servers

This commit is contained in:
2026-01-15 14:34:59 +01:00
parent 6b4fb7aa47
commit 2c67d3c464

View File

@@ -48,6 +48,24 @@ ssh root@192.168.2.XX # Dann zum Zielserver (z.B. .53 für Palworld)
```
Oder in einem Befehl: `ssh alex@192.168.2.10 "ssh root@192.168.2.53 'befehl'"`
## GSM API - Wichtige interne Routes
**Discord Update senden** (nur von localhost):
```bash
ssh root@192.168.2.30 'curl -X POST http://localhost:3000/api/servers/discord/internal-update \
-H "Content-Type: application/json" \
-d "{\"title\": \"Titel\", \"description\": \"Beschreibung\", \"serverType\": \"hytale\", \"color\": 65535}"'
```
- `serverType`: minecraft, factorio, zomboid, vrising, palworld, terraria, openttd, hytale (für Icon)
- `color`: Dezimal-Farbwert (z.B. 0x00BFFF = 49151)
**Server ohne RCON (Spielererkennung via Log-Parsing)**:
- Hytale: Spieler werden über Server-Logs erkannt (`[World|*] Player joined` / `[PlayerSystems] Removing player`)
- Bei neuen Servern ohne RCON: `server.type === 'serverid'` zu folgenden Dateien hinzufügen:
- `services/autoshutdown.js` (Zeile ~50)
- `services/discordBot.js` (fetchServerStatuses, Zeile ~379)
- `routes/servers.js` (zwei Stellen, suche nach `rconPassword || server.type`)
## Language Note
Documentation is written in German.