Skip to content

Hailey-Ross/hails.widgetcast

Repository files navigation

hails.live Discord Widget

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.

Preview

Widget expanded view Widget compact view

How It Works

  1. 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.
  2. sync.js fetches those endpoints on an interval and formats a large catalog of named fields into Discord's identity profile payload.
  3. The payload is sent via PATCH to Discord's Social Layer API, updating the widget shown on your Discord profile.
  4. The widget layout itself is configured once in the Discord Developer Portal and maps named data fields to visual elements.

Documentation

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

Quick start

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_SHORTCODE

Preview every available field with live data, no Discord credentials needed:

DRY_RUN=1 node sync.js

Then run it for real:

node sync.js

For the full server setup (PM2, reboots) see Installation, and for the one-time Discord configuration see Discord App Setup.

About

Azuracast → Discord widget v2 web processor

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors