Skip to main content

Fetching Lyrics

This section explains how to use Salada’s built-in lyrics feature to get synced or plain lyrics for any track, enhanced with metadata from Spotify.

Prerequisites

To use the lyrics feature, you must provide Spotify API credentials in your node configuration. This is required to fetch song metadata like album art, which enriches the lyrics display.

Complete Lyrics Command Example

Here is a complete example of a /lyrics command for a Discord bot. It fetches lyrics for the currently playing song and displays them in a paginated embed.

Core Concepts

Fetching Lyrics from a Track

The primary method for getting lyrics is track.fetch_lyrics(player). It automatically handles fetching and caching.

Accessing the Lyrics Handler

If you need to access the Spotify metadata functions directly, you can get the lyrics handler from the player.
The syncedlyrics library performs web scraping and can sometimes be slow or fail. Always wrap your lyrics-fetching calls in try...except blocks and handle cases where no lyrics are found gracefully.
Since lyrics can be very long, always paginate them for a better user experience in Discord. Splitting the text into multiple embeds or using Discord’s Paginator is highly recommended.