Use server logos as thumbnails in Discord update embeds
All checks were successful
Deploy GSM / deploy (push) Successful in 23s

Replaced emoji icons with actual server logos from gsm.zeasy.dev
as embed thumbnails for a more professional look.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alexander Zielonka
2026-01-19 12:30:39 +01:00
parent 266c1705a2
commit ed60bc33c7

View File

@@ -880,17 +880,27 @@ router.post("/discord/send-update", authenticateToken, requireRole("superadmin")
}
try {
const serverIcons = {
minecraft: '⛏️', factorio: '⚙️', zomboid: '🧟', vrising: '🧛',
palworld: '🦎', terraria: '⚔️', openttd: '🚂', hytale: '🏰'
const serverLogos = {
minecraft: 'https://gsm.zeasy.dev/minecraft.png',
factorio: 'https://gsm.zeasy.dev/factorio.png',
zomboid: 'https://gsm.zeasy.dev/zomboid.png',
vrising: 'https://gsm.zeasy.dev/vrising.png',
palworld: 'https://gsm.zeasy.dev/palworld.png',
terraria: 'https://gsm.zeasy.dev/terraria.png',
openttd: 'https://gsm.zeasy.dev/openttd.png',
hytale: 'https://gsm.zeasy.dev/hytale.png'
};
const embed = new EmbedBuilder()
.setTitle((serverIcons[serverType] || '📢') + ' ' + title)
.setTitle(title)
.setDescription(description)
.setColor(color || 0x5865F2)
.setTimestamp();
if (serverLogos[serverType]) {
embed.setThumbnail(serverLogos[serverType]);
}
await sendUpdateToAllGuilds(embed);
logActivity(req.user.id, req.user.username, 'discord_update', serverType || 'general', title, req.user.discordId, req.user.avatar);
res.json({ message: "Update sent to all Discord guilds" });
@@ -913,17 +923,27 @@ router.post("/discord/internal-update", async (req, res) => {
}
try {
const serverIcons = {
minecraft: '⛏️', factorio: '⚙️', zomboid: '🧟', vrising: '🧛',
palworld: '🦎', terraria: '⚔️', openttd: '🚂', hytale: '🏰'
const serverLogos = {
minecraft: 'https://gsm.zeasy.dev/minecraft.png',
factorio: 'https://gsm.zeasy.dev/factorio.png',
zomboid: 'https://gsm.zeasy.dev/zomboid.png',
vrising: 'https://gsm.zeasy.dev/vrising.png',
palworld: 'https://gsm.zeasy.dev/palworld.png',
terraria: 'https://gsm.zeasy.dev/terraria.png',
openttd: 'https://gsm.zeasy.dev/openttd.png',
hytale: 'https://gsm.zeasy.dev/hytale.png'
};
const embed = new EmbedBuilder()
.setTitle((serverIcons[serverType] || '📢') + ' ' + title)
.setTitle(title)
.setDescription(description)
.setColor(color || 0x5865F2)
.setTimestamp();
if (serverLogos[serverType]) {
embed.setThumbnail(serverLogos[serverType]);
}
await sendUpdateToAllGuilds(embed);
res.json({ message: "Update sent" });
} catch (err) {