Lyrics¶
- class lava_lyra.lyrics.LyricLine(text: str, time: float, duration: float | None = None)[source]¶
Bases:
objectSingle line lyric class
- duration: float | None = None¶
- text: str¶
- time: float¶
- class lava_lyra.lyrics.LyricsManager(player: Player)[source]¶
Bases:
objectLyrics manager - handles all lyrics related functionalities
- property enabled: bool¶
Check if lyrics feature is enabled on the node
- async fetch_lyrics(track=None, skip_track_source: bool = False, lang: str | None = None) Lyrics | None[source]¶
Fetch lyrics
- Args:
track: Track object (default: current track) skip_track_source: Skip track source when searching (NodeLink only) lang: Language code for YouTube captions (NodeLink only)
- Returns:
Lyrics object or None
- get_current_lyrics_lines(range_seconds: float = 5.0) List[LyricLine][source]¶
Get lyric lines near the current playback position
- property has_lyrics: bool¶
Check if there are lyrics
- property is_nodelink: bool¶
Check if current node is NodeLink
- property is_subscribed: bool¶
Check if subscribed to live lyrics
- property lyrics_loaded: bool¶
Check if lyrics have been attempted to load
- async subscribe_lyrics(skip_track_source: bool = False) bool[source]¶
Subscribe to live lyrics
- Note:
Lavalink v4: Full support via POST endpoint
NodeLink: Not supported (this is a no-op)
- Returns:
bool: True if successful, False otherwise