Add Hytale to Discord bot alerts and status
All checks were successful
Deploy GSM / deploy (push) Successful in 28s

- Add hytale to serverDisplay config with icon 🏰 and color
- Fix fetchServerStatuses to get players for Hytale (no RCON)
- Enables player join/leave alerts for Hytale

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-15 14:32:11 +01:00
parent 14b031bb93
commit 751991143a

View File

@@ -22,7 +22,8 @@ const serverDisplay = {
vrising: { name: 'V Rising', icon: '🧛', color: 0xDC2626, address: 'vrising.zeasy.dev' },
palworld: { name: 'Palworld', icon: '🦎', color: 0x00D4AA, address: 'palworld.zeasy.dev:8211' },
terraria: { name: 'Terraria', icon: '⚔️', color: 0x05C46B, address: 'terraria.zeasy.dev:7777' },
openttd: { name: 'OpenTTD', icon: '🚂', color: 0x1E90FF, address: 'openttd.zeasy.dev:3979' }
openttd: { name: 'OpenTTD', icon: '🚂', color: 0x1E90FF, address: 'openttd.zeasy.dev:3979' },
hytale: { name: 'Hytale', icon: '🏰', color: 0x00BFFF, address: 'hytale.zeasy.dev:5520' }
};
function loadConfig() {
@@ -375,12 +376,12 @@ async function fetchServerStatuses() {
let players = { online: 0, max: null };
let playerList = { players: [] };
if (running && server.rconPassword) {
if (running && (server.rconPassword || server.type === 'hytale')) {
try {
players = await getPlayers(server);
playerList = await getPlayerList(server);
} catch (e) {
// RCON might fail
// RCON/log parsing might fail
}
}