task: #107 Discord Server Status Embeds

Auto-post and update server status in each game server's chat channel.
Queries Pterodactyl API, posts Discord embed, updates on schedule.

15 server channels mapped.

Chronicler #75
This commit is contained in:
Claude
2026-04-10 15:33:17 +00:00
parent 3a68a809a6
commit f6862e4bd0

View File

@@ -0,0 +1,76 @@
---
task_number: 107
title: Discord Server Status Embeds
status: Planned
priority: P2-Medium
is_blocker: false
owner: Michael
tags:
- arbiter
- discord
- automation
estimated_hours: 4
---
# Task #107: Discord Server Status Embeds
## Overview
Auto-post and update server status embeds in each game server's Discord chat channel. Status shows online/offline, player count, and server info.
## Requirements
- Query Pterodactyl API for server status
- Post embed to each server's `-chat` channel
- Update embed every 5-10 minutes (edit, not new message)
- Store message IDs in database to enable editing
- Handle servers that are offline gracefully
## Target Channels
| Server | Channel ID |
|--------|------------|
| Stoneblock 4 | 1491030845106946241 |
| Society: Sunlit Valley | 1491031870383853638 |
| ATM10: To the Sky | 1491051103251599360 |
| All the Mons | 1491051785006223520 |
| Mythcraft 5 | 1491052926289051839 |
| Beyond Depth | 1491480196405268643 |
| Beyond Ascension | 1491480214730047639 |
| Otherworld | 1491480234225307752 |
| DeceasedCraft | 1491480255720853697 |
| Submerged 2 | 1491480274582896811 |
| Sneak's Pirate Pack | 1491480294300061886 |
| Cottage Witch | 1491480328982761592 |
| Farm Crossing 5 | 1491480347572179027 |
| Homestead | 1491480370506367126 |
| Wold's Vaults | 1491481401176887356 |
## Embed Format
```
🟢 SERVER ONLINE (or 🔴 OFFLINE)
━━━━━━━━━━━━━━━━
Players: 3/20
Version: 1.20.1
IP: servername.firefrostgaming.com
Last Updated: 5 min ago
```
## Implementation Notes
- New file: `services/arbiter-3.0/src/services/serverStatusPoller.js`
- Database table: `discord_status_messages` (server_id, channel_id, message_id)
- Cron job or setInterval in Arbiter main
- Use Pterodactyl API: `GET /api/client/servers/{id}/resources`
## Dependencies
- Pterodactyl API key (already in .env)
- Discord bot token (already in .env)
- Server ID → Channel ID mapping (can use existing channel naming convention)
## Links
- Pterodactyl API docs: https://dashflo.net/docs/api/pterodactyl/v1/
- Discord embed docs: https://discord.com/developers/docs/resources/message#embed-object