SPYR0.DEV

ARCHIVED CONTRIBUTION · LAST TOUCHED FEB 2026

Pterodactyl server controls, but from Discord.

This was an existing Go bot codebase I worked on and extended. The idea was simple: game-server admins already live in Discord, so the useful Pterodactyl controls and status information should be there too.

STATUS Archived·STACK Go / Discord / Pterodactyl API·Docker

The main reason I built on it

You could actually control the servers from Discord.

This was probably the part I spent the most time on. I did not just want Discord to mirror the Pterodactyl status page. The useful bit was being able to handle normal server admin stuff without opening the panel at all.

The interactive dashboard posted one card per server. From there you could start, stop, restart or refresh a server with buttons. Slash commands handled console commands and backups, and server-name autocomplete meant you did not have to remember IDs.

# server-controlPTBot
PT
PTBotBOTToday at 19:42
ARK Survival AscendedServer is running
ONLINE
CPU18.4% RAM7.2 / 16 GB NETWORK2.8 MiB/s
LAST 60 MINUTESCPU ▂▃▂▄▅▃▂▃▆▅▄▃▂▂▃▅▆▃RAM ▃▃▄▄▄▄▅▅▅▅▅▅▆▆▆▆▆▆
Start Stop Restart Refresh
Spyr0 /pt send name:ARK Survival Ascended command:SaveWorld
PTBot

Console command sent to ARK Survival Ascended.

BUTTONS

Start, stop and restart

The dashboard buttons were real controls, not decoration. Clicking one sent the matching power signal through the Pterodactyl API.

CONSOLE

Run server commands

/pt send could pass a console command straight to the selected server, which was handy for saves or admin commands.

BACKUPS

Create backups from chat

/pt backup created a Pterodactyl backup without needing to open the panel first.

Under the hood

The Discord buttons were wired straight into the power actions.

The actual control row in the bot looked roughly like this. Each button carried the action and server ID in its custom ID, then the interaction handler passed that through to the Pterodactyl power endpoint.

discordgo.Button{
    Label: "Start",
    Style: discordgo.SuccessButton,
    CustomID: fmt.Sprintf("ptbot:power:start:%s:%s", ctx, id),
},
discordgo.Button{
    Label: "Stop",
    Style: discordgo.DangerButton,
    CustomID: fmt.Sprintf("ptbot:power:stop:%s:%s", ctx, id),
},
discordgo.Button{
    Label: "Restart",
    Style: discordgo.PrimaryButton,
    CustomID: fmt.Sprintf("ptbot:power:restart:%s:%s", ctx, id),
}

The same project also exposed /pt start, /pt stop, /pt restart, /pt send and /pt backup as slash commands.

Status boards

And you could still see what the servers were doing.

The bot could keep auto-updating status boards in Discord, so people did not need to open Pterodactyl just to check whether a server was online or how it had been behaving.

SERVER STATUSLAST REFRESHED JUST NOW
ARK ServerRUNNING · CPU / RAM / NETWORK
Game Server 02RUNNING · CPU / RAM / NETWORK
Test ServerOFFLINE · WAITING
Steam WatchBUILD ID MONITOR ACTIVE

The bits I still like

Status history and update handling got surprisingly deep.

METRICS

One-hour sparklines

CPU, RAM and network samples were stored for the last hour and rendered as small trend lines directly in Discord status cards.

STEAM

Build update watcher

The bot watched Steam build IDs, confirmed changes before alerting and could schedule restart flows for servers matching a Pterodactyl egg.

RESTARTS

Warnings before touching servers

Scheduled restarts could post countdown warnings, perform restart or stop/start flows and then watch until the target servers were running again.

ACCESS

Per-user panel keys

Users could optionally store their own Pterodactyl API key so the bot used their panel permissions. Those tokens were encrypted at rest.

Why it is here

It is a good example of a utility growing around a real problem.

The last changes were in February 2026. I do not work on this repo anymore, but the server-status, Steam-watch and restart pieces are still the kind of practical automation I enjoy building.

Email copied