Skip to content

Implemented lyrics button on player to fetch and display song lyrics#111

Draft
Wikijito7 wants to merge 4 commits into
masterfrom
feature/110-lyrics-button
Draft

Implemented lyrics button on player to fetch and display song lyrics#111
Wikijito7 wants to merge 4 commits into
masterfrom
feature/110-lyrics-button

Conversation

@Wikijito7

@Wikijito7 Wikijito7 commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Solves #110

📋 Changelist Summary

Added a lyrics button (📝) to the player that fetches and displays song lyrics using LavaLyrics + LavaSrc (Deezer + LrcLib), with auto-follow on track changes and toggle on/off behavior.

💬 Description

  • Created LyricsService wrapping LavaLyrics' LyricsManager with registerLyricsManager(), loadLyrics(), and getFormattedLyrics()
  • Registered Deezer AudioSourceManager and LrcLibLyricsManager as lyrics providers in AudioPlayerManagerProvider
  • Added PLAYER_LYRICS component and 📝 button to the player action row
  • Implemented toggle behavior in PlayerCommand.onInteract(): first click sends public lyrics + auto-follows track changes, second click deletes it
  • Added lyricsMessage field in GuildLavaPlayerService with updateLyricsMessage() in onTrackStart() and cleanup on disconnect
  • Added localization keys (EN/ES) for all user-facing strings
  • Updated CommandHandlerService routing for PLAYER_LYRICS
  • 12 new unit tests: 5 for LyricsService, 5 for PlayerCommand.handleLyricsButton(), 1 for AudioPlayerManagerProvider (lyricsConfigured), 1 for CommandHandlerService (routing)

ℹ️ Extra info

  • All 355 tests pass (5 pre-existing skipped)
  • Lyrics resolution priority: Deezer (native) → LrcLib (fallback for any track)
  • Error messages (no track, no lyrics) are ephemeral — only the clicker sees them
  • Coverage improvements: CommandHandlerServiceTest (0%→4.5%), PlayerCommandTest (6.7%→10.0%), AudioPlayerManagerProviderTest (83.3%→87.5%)

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Implement lyrics button on player to fetch and display song lyrics

1 participant