Releases: emerauda/TopazBot
Releases · emerauda/TopazBot
Release list
TopazBot v3.1.0
Highlights
This release overhauls the playback engine for reliability, cuts end-to-end audio latency, and modernizes the entire toolchain.
🔧 Fixed
- Playback sessions are now properly cancelled —
/stop,/resyncand stream switching invalidate the running playback loop (epoch-based session ownership). Previously, stale loops kept spawning FFmpeg processes against the RTSP server forever after a stop. - Inverted 30-minute cutoff — healthy long-running streams used to be disconnected after 30 minutes while dead sessions were never cleaned up. Auto-disconnect now only triggers after 30 minutes without successful playback.
- FFmpeg lifecycle — the per-attempt process is always killed in a
finallyblock, and stderr can no longer fill up and stall FFmpeg (-nostats+ always consumed). - FFmpeg flags that silently did nothing now work —
-fflags +genpts+discardcorruptmoved to the input side, HTTP-only-reconnectoptions removed,-ar/-acdropped from the copy path. - Crash-proofing — rejected promises from playback or
editReplyno longer crash the process; interaction handling is fully guarded. - Kick / channel-deletion recovery — voice connections use the standard Disconnected recovery pattern (5s grace for channel moves) instead of retrying forever.
- Copy-mode misconfiguration auto-recovers —
INPUT_IS_OPUS=1against an AAC source (TopazChat/VRCDN) now falls back to libopus re-encode automatically instead of failing silently in a loop. - Timestamp jitter warnings eliminated — dropped
-use_wallclock_as_timestamps(arrival-time stamping caused backward timestamps and non-monotonic DTS spam) and smooth input timestamps witharesample=async=1.
⚡ Latency
LOW_LATENCY=1now also removes the two hidden buffers: the Ogg muxer's default 1-second page buffering (now 20 ms pages +flush_packets) and the RTSP demuxer's 0.5-second reorder buffer (max_delay 0, safe over TCP). Bot-side latency drops to roughly 0.1–0.3 s.
✨ Added
/resyncaccepts an optionalstreamkey; all commands are registered guild-only (InteractionContextType.Guild) usingApplicationCommandOptionType.- Graceful shutdown on SIGINT/SIGTERM —
pm2 stop/pm2 restartleaves no orphan FFmpeg processes or voice connections. - Startup warning when
DOWNMIX_MONO/CHANNEL_FIX_MODEare ignored in copy mode.
📦 Dependencies & tooling
- discord.js 14.26.5 (Discord API v10,
clientReady), @snazzah/davey 0.1.12 (DAVE E2EE), TypeScript 6.0.3, ESLint 10, Jest 30.4.2. - Security overrides for
undici/tar—npm audit: 0 vulnerabilities. - Lint/typecheck/Prettier now cover the test suite; CI runs tests with coverage on Node 22/24, uploads to Codecov, and Dependabot checks weekly. CircleCI uses
cimg/nodeimages so@discordjs/opuscan compile from source when no prebuilt binary matches.
📚 Docs
- READMEs document playback behavior (auto-resume, auto-disconnect, stream switching, graceful shutdown), the complete environment variable list, and the optional resync key;
.env.examplerecommendations corrected for TopazChat (AAC input); natural-Japanese rewrite of README-JP.md.
Full Changelog: v3.0.2...v3.1.0
TopazBot v3.0.2
Changelog
3.0.2 - 2026-03-28
Added
- DAVE encryption support with
@snazzah/davey^0.1.10 for Discord Voice Gateway v8. - Comprehensive environment variable configuration (
USE_EXTERNAL_OPUS,INPUT_IS_OPUS,FORCE_OPUS_REENCODE,LOW_LATENCY,OPUS_BITRATE,CHANNEL_FIX_MODE,DEBUG_FFMPEG, etc.). - Enhanced
.env.examplewith all supported options and recommended presets. CLAUDE.mdfor AI assistant context.repository,engines,bugs,homepage,keywordsfields topackage.json.typecheckscript (tsc --noEmit) to npm scripts.- Environment variable table to README.md and README-JP.md configuration sections.
Changed
- Breaking: Updated
@discordjs/voicefrom ^0.18.0 to ^0.19.2 (Voice Gateway v8 support). - Updated
discord.jsfrom ^14.21.0 to ^14.25.1. - Updated
sodium-nativefrom ^5.0.6 to ^5.1.0. - Updated
typescriptfrom ^5.8.3 to ^5.9.3,@types/nodeto ^24.7.0. - Updated
eslintto ^9.37.0,jestto ^30.2.0. - Refactored FFmpeg stream handling with configurable Opus copy / re-encode / AAC fallback modes.
- Enhanced stream playback: support switching streams, prevent duplicate playback per guild.
- Changed
client.once('ready')toclient.once('clientReady')for discord.js v15 compatibility. - Improved README.md and README-JP.md: corrected script descriptions, expanded configuration docs.
- Quoted glob patterns in
lint/formatnpm scripts to prevent shell expansion.
Fixed
- Voice connection
signalling → connecting → signallinginfinite loop caused by Voice Gateway v4 deprecation. - Stream playback check to handle cases with no previous stream key.
.gitignore: untracked.vscode/, restored.circleci/and.github/tracking.
Deprecated
- N/A
Removed
- N/A
Security
- Added DAVE (Discord Audio Video Encryption) support required by Discord's updated voice protocol.
Full Changelog: v2.0.1...v3.0.2
TopazBot v2.0.1
Changelog
All notable changes to TopazBot are documented in this file.
2.0.1 - 2025-07-04
Added
- Release notes in English for version 2.0.1
Changed
-
Website & Documentation:
- Integrated custom dark theme CSS (
assets/css/style.css) with Jekyll GitHub Pages deployment. - Updated Jekyll workflow to include README files, assets, and custom head script for Mermaid diagrams.
- Enhanced site layout to mimic GitHub repository style using GitHub Markdown CSS and responsive wrapper.
- Centered content with a max-width of 780px for improved readability.
- Ensured dark background (
#0d1117) applies to entire page (html,body). - Swapped CSS link order to allow custom styles to override theme defaults.
- Integrated custom dark theme CSS (
-
Mermaid Integration:
- Added Mermaid.js initialization in page head and default layout script.
- Supported converting fenced Mermaid code blocks to diagram containers for GitHub Pages.
-
Prettier & Formatting:
- Fixed nested-quote syntax in
_layouts/default.htmlto satisfy Prettier checks. - Enforced consistent formatting on HTML, CSS, and Markdown files.
- Fixed nested-quote syntax in
Fixed
- Layout background issue where non-content areas appeared white.
- Central alignment of documentation wrapper to prevent left-aligned content.
Deprecated
- N/A
Removed
- N/A
Security
- N/A
Full Changelog: v2.0.0...v2.0.1
v2.0.0
Change from JavaScript to TypeScript
Full Changelog: v1.0.3...v2.0.0
v1.0.3
v1.0.1
Add ts-node
Full Changelog: v1.0.0...v1.0.1
TopazBot v1.0.0
Transition to Typescript and Improvements
Full Changelog: v0.4.0...v1.0.0
TopazBot v0.4.0
Refactor voice channel handling and enhance stream playback functionality
- Improved the joinVoice function to handle voice channel accessibility checks.
- Added auto-resume functionality for streams when idle.
- Refactored playStream and autoResume functions for better clarity and error handling.
- Updated FFmpeg stream creation to use 'adts' format and copy audio codec.
- Enhanced logging for connection status and stream activity.
- Cleaned up redundant code and improved overall structure for maintainability.
Full Changelog: v0.3.20...v0.4.0
TopazBot v0.3.20
Full Changelog: 0.3.17...v0.3.20