Fixes:
- Update dependencies within their ranges: npm audit reported 8
vulnerabilities (proxy-addr, multer, body-parser, undici...), now 0.
- Close open connections on shutdown: an open jukebox page kept its
/api/events stream alive, so every restart waited for the 10 s
forced exit and ended with code 1.
- Restore the ANSI escape characters of the game servers message, lost
in a269824 (the status showed "[2;32mOnline[0m" as plain text). They
are now written as \u001b so they cannot silently disappear again.
- Rename MusicQueue.listeners(), which shadowed EventEmitter's own
listeners(eventName), to humanListeners().
- Deploy: check the VM's SSH host key (new DEPLOY_KNOWN_HOSTS secret)
instead of StrictHostKeyChecking=no; run checks on push only, since
PR branches are already checked by their push.
Commands:
- /listcommand is built from the loaded commands and their descriptions.
- /deletemsgs reports messages older than 14 days that it cannot delete.
- Vocal commands act on the caller's voice channel, falling back to
VOICE_CHANNEL_ID.
- /maketeam accepts comma-separated names, so names can contain spaces.
- The game servers message is edited whenever its content changes, and
a failed first update is retried instead of stopping the refresh.
Cleanup:
- Shared command loader (src/loadCommands.js); drop the unused
"[disabled]" folders mechanism and the NODE_ENV requirement.
- SHINUWA_USER_ID becomes OWNER_USER_ID (the old name still works).
- One shuffle helper instead of three copies; remove dead code
(validateAudioFile, PORT fallback, needless async).
- README: prerequisites first, consistent Node version, deploy secrets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Save the queue to storage/runtime/queue.json and restore it at startup,
the interrupted track first; playback resumes once someone is in the
voice channel. Shutdown keeps the queued files instead of deleting them.
- Shuffle the upcoming tracks; loop mode sends finished tracks back to the
end of the queue, except removed or failed ones.
- Rename library tracks (queued copies follow), enqueue the whole library,
optionally shuffled.
- Stream queue and library changes to the web page with Server-Sent Events
(GET /api/events).
- Sanitise the requester name sent when queueing a library track.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Download direct audio links server side (web page and /play), refusing
internal and special addresses at connection time and after every
redirect, with size and time limits.
- /play takes an attachment, a direct link or a library track
(autocomplete), and can keep the file in the library; /skip and /queue
control and show the shared queue.
- Share one ingest path between uploads, links and Discord attachments.
- Answer 413 instead of 500 when the library is full.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /api/notifications/dm takes a user id and a text, sends it as a direct message with no active mentions, and answers 204, 400, 404 or 422.
- The send logic lives in src/features/directMessages.js with its own tests; the route gets its own per-minute rate limit behind the existing API key.
- Sokko TCG uses it for its opt-in Expedition alerts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>