Skip to content

Releases: emerauda/TopazBot

TopazBot v3.1.0

Choose a tag to compare

@emerauda emerauda released this 13 Jul 18:50
v3.1.0
c1fa9c3

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, /resync and 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 finally block, and stderr can no longer fill up and stall FFmpeg (-nostats + always consumed).
  • FFmpeg flags that silently did nothing now work-fflags +genpts+discardcorrupt moved to the input side, HTTP-only -reconnect options removed, -ar/-ac dropped from the copy path.
  • Crash-proofing — rejected promises from playback or editReply no 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-recoversINPUT_IS_OPUS=1 against 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 with aresample=async=1.

⚡ Latency

  • LOW_LATENCY=1 now 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

  • /resync accepts an optional streamkey; all commands are registered guild-only (InteractionContextType.Guild) using ApplicationCommandOptionType.
  • Graceful shutdown on SIGINT/SIGTERM — pm2 stop/pm2 restart leaves no orphan FFmpeg processes or voice connections.
  • Startup warning when DOWNMIX_MONO/CHANNEL_FIX_MODE are 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/tarnpm 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/node images so @discordjs/opus can 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.example recommendations corrected for TopazChat (AAC input); natural-Japanese rewrite of README-JP.md.

Full Changelog: v3.0.2...v3.1.0

TopazBot v3.0.2

Choose a tag to compare

@emerauda emerauda released this 27 Mar 17:07
v3.0.2
bda4ce1

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.example with all supported options and recommended presets.
  • CLAUDE.md for AI assistant context.
  • repository, engines, bugs, homepage, keywords fields to package.json.
  • typecheck script (tsc --noEmit) to npm scripts.
  • Environment variable table to README.md and README-JP.md configuration sections.

Changed

  • Breaking: Updated @discordjs/voice from ^0.18.0 to ^0.19.2 (Voice Gateway v8 support).
  • Updated discord.js from ^14.21.0 to ^14.25.1.
  • Updated sodium-native from ^5.0.6 to ^5.1.0.
  • Updated typescript from ^5.8.3 to ^5.9.3, @types/node to ^24.7.0.
  • Updated eslint to ^9.37.0, jest to ^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') to client.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/format npm scripts to prevent shell expansion.

Fixed

  • Voice connection signalling → connecting → signalling infinite 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

Choose a tag to compare

@emerauda emerauda released this 04 Jul 07:43
0687981

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.
  • 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.html to satisfy Prettier checks.
    • Enforced consistent formatting on HTML, CSS, and Markdown files.

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

Choose a tag to compare

@emerauda emerauda released this 01 Jul 21:06
db56209

Change from JavaScript to TypeScript
Full Changelog: v1.0.3...v2.0.0

v1.0.3

Choose a tag to compare

@emerauda emerauda released this 21 Jun 04:56
8a4ffb9

Some fix
Full Changelog: v1.0.2...v1.0.3

v1.0.1

Choose a tag to compare

@emerauda emerauda released this 20 Jun 19:11
b2b7dd0

Add ts-node
Full Changelog: v1.0.0...v1.0.1

TopazBot v1.0.0

Choose a tag to compare

@emerauda emerauda released this 20 Jun 18:18

Transition to Typescript and Improvements
Full Changelog: v0.4.0...v1.0.0

TopazBot v0.4.0

Choose a tag to compare

@ROZ-MOFUMOFU-ME ROZ-MOFUMOFU-ME released this 04 Dec 22:44

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

Choose a tag to compare

@ROZ-MOFUMOFU-ME ROZ-MOFUMOFU-ME released this 03 Dec 19:35

Full Changelog: 0.3.17...v0.3.20

TopazBot 0.3.17

Choose a tag to compare

@ROZ-MOFUMOFU-ME ROZ-MOFUMOFU-ME released this 12 Feb 14:13
2fc7df0

Some Fix