A Discord bot that provides real-time status information for amateur radio reflectors. Supports reflectors running mfiscus's URFD API or the default MREFD API bundled with KC1AWV's gomrefdash.
| Command | Description |
|---|---|
/status |
Reflector operational status and uptime |
/lastheard |
Last 5 stations heard on the reflector |
/peers |
Interlinked peer reflectors |
/links |
Repeaters currently linked to the reflector |
All responses are ephemeral (visible only to the user who ran the command).
- A Discord application and bot token — create one at discord.com/developers
- A running URF or MREF reflector with a compatible JSON API
- Node.js 22+ (for local deployment) or Docker
Copy config.json-example to config.json and fill in your values:
{
"token": "your-bot-token",
"clientId": "your-application-id",
"guildId": "your-server-id",
"icon": "https://example.com/your-icon.png",
"url": "https://your-reflector-dashboard-url"
}| Field | Description |
|---|---|
token |
Discord bot token (from the Bot section of your application) |
clientId |
Discord application ID (from General Information) |
guildId |
Discord server ID (right-click your server → Copy Server ID) |
icon |
URL to an image used as the embed author icon |
url |
Base URL of your reflector dashboard (no trailing slash) |
services:
ref-bot:
image: mfiscus/ref-bot:latest
container_name: ref-bot
volumes:
- /opt/ref-bot:/config
restart: unless-stoppedPlace your config.json at /opt/ref-bot/config.json on the host, then:
docker compose up -dnpm install
node deploy-commands.js # register slash commands with Discord (run once)
node index.jsNote:
deploy-commands.jsonly needs to be run when adding or changing slash commands.
npm install
npx eslint . # lint
npm test # run tests
node index.js # runTests are written with Jest and live in the tests/ directory:
| Path | Type | What it covers |
|---|---|---|
tests/unit/utils.test.js |
Unit | Utility functions (pluralize, timeSinceDate, timeSinceSeconds) |
tests/integration/commands/*.test.js |
Integration | Each slash command (status, lastheard, peers, links) |
The integration tests mock undici (HTTP requests) and discord.js so no live reflector or Discord connection is needed.
npm test # run all tests
npx jest tests/unit # unit tests only
npx jest tests/integration # integration tests only
npx jest --coverage # with coverage reportPre-built multi-architecture images (linux/amd64, linux/arm64) are published automatically to hub.docker.com/r/mfiscus/ref-bot on every push to main, on tagged releases, and on a monthly schedule to pick up base image updates.