Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.6.67] - 2026-04-10

### Fixed

- **YouTube extractor registration** (`packages/bot/src/handlers/player/playerFactory.ts`): `discord-player-youtubei@3.0.0-beta.4` renamed the extractor class from `YoutubeiExtractor` to `YoutubeExtractor` and removed `streamOptions.useClient` / `generateWithPoToken` from the registration options. The old import resolved to `undefined`, causing every bot startup to silently skip YouTube extractor registration and log "YouTube extractor unavailable." All YouTube-backed tracks then fell through to the SoundCloud extractor, which cannot stream tracks unavailable on SoundCloud (e.g. anime openings, niche indie tracks), producing `NoResultError: Could not extract stream for this track` (Sentry LUCKY-2J). Fix: resolve the export by name with a v2 fallback (`YoutubeExtractor ?? YoutubeiExtractor`), drop the removed options, and guard explicitly when neither export is present.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the test file no longer references removed registration options

echo "=== Searching for removed option references in test file ==="
rg -n -A 3 -B 3 'streamOptions\.useClient|generateWithPoToken|highWaterMark' packages/bot/src/handlers/player/playerFactory.spec.ts

echo -e "\n=== Checking current test structure ==="
rg -n -A 10 'describe.*YouTube extractor' packages/bot/src/handlers/player/playerFactory.spec.ts

Repository: LucasSantana-Dev/Lucky

Length of output: 1722


Update test file to remove references to removed extractor registration options.

The test file still validates removed options (streamOptions.useClient, generateWithPoToken, highWaterMark) that are no longer part of the extractor registration API following the discord-player-youtubei@3.0.0-beta.4 upgrade. Tests should be updated to validate only the new registration approach (passing createStream directly).

Test file evidence
35-            const extractorOptions = {
36-                streamOptions: {
37-                    useClient: 'IOS' as const,
38:                    highWaterMark: 1 << 25,
39-                },
40:                generateWithPoToken: true,
41-            }

Test still expects these removed properties to exist (lines 43-45).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 14, The test still builds an extractorOptions object
with removed keys (streamOptions.useClient, streamOptions.highWaterMark,
generateWithPoToken); update the test to remove those properties from
extractorOptions and instead assert the new registration shape that passes
createStream directly (e.g., validate that the registration call receives a
createStream function and not the old streamOptions/generateWithPoToken fields).
Locate references to extractorOptions and any assertions that check
streamOptions.useClient / highWaterMark / generateWithPoToken and replace them
with assertions that the passed createStream (or equivalent callback) exists and
is used.


## [2.6.66] - 2026-04-09

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lucky-bot",
"version": "2.6.66",
"version": "2.6.67",
"description": "All-in-one Discord bot platform — music, moderation, auto-mod, custom commands, and web dashboard",
"type": "module",
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucky/backend",
"version": "2.6.66",
"version": "2.6.67",
"description": "Express API server for Lucky",
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/bot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucky/bot",
"version": "2.6.66",
"version": "2.6.67",
"description": "Discord bot application",
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lucky-webapp",
"private": true,
"version": "2.6.66",
"version": "2.6.67",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucky/shared",
"version": "2.6.66",
"version": "2.6.67",
"description": "Shared code for Lucky modular monolith",
"type": "module",
"main": "./dist/index.js",
Expand Down