A service that bridges an AzuraCast radio station with Discord's profile widget system (Widget v2 / Social Layer). It polls the AzuraCast public API and pushes live now-playing data to a Discord profile widget.
- AzuraCast exposes public JSON APIs for the current track, up-next track, listener stats, song history, station details, the upcoming schedule, and the song requests queue.
sync.jsfetches those endpoints on an interval and formats a large catalog of named fields into Discord's identity profile payload.- The payload is sent via
PATCHto Discord's Social Layer API, updating the widget shown on your Discord profile. - The widget layout itself is configured once in the Discord Developer Portal and maps named data fields to visual elements.
Full setup, configuration, the data-field catalog, and troubleshooting live in the project wiki:
| Page | What it covers |
|---|---|
| Installation | Prerequisites, server setup, and running under PM2 |
| Discord App Setup | One-time Discord Developer Portal steps and adding the widget to your profile |
| Configuration | Every .env variable, data sources, the field limit, and rate limiting |
| Field Catalog | The full list of named data fields you can map to your widget layout |
| AzuraCast API Reference | The public AzuraCast endpoints this service reads |
| Troubleshooting | Common log messages, their causes, and fixes |
git clone https://github.com/Hailey-Ross/hails.widgetcast.git
cd hails.widgetcast
npm install
cp .env.example .env
# fill in BOT_TOKEN, APPLICATION_ID, USER_ID, AZURACAST_BASE_URL, STATION_SHORTCODEPreview every available field with live data, no Discord credentials needed:
DRY_RUN=1 node sync.jsThen run it for real:
node sync.jsFor the full server setup (PM2, reboots) see Installation, and for the one-time Discord configuration see Discord App Setup.

