From 751991143aff2a6acce5e93a76d3b12f71f8b4dc Mon Sep 17 00:00:00 2001 From: Alexander Zielonka Date: Thu, 15 Jan 2026 14:32:11 +0100 Subject: [PATCH] Add Hytale to Discord bot alerts and status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- gsm-backend/services/discordBot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gsm-backend/services/discordBot.js b/gsm-backend/services/discordBot.js index 4c5e875..45d2e66 100644 --- a/gsm-backend/services/discordBot.js +++ b/gsm-backend/services/discordBot.js @@ -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 } }