Skip to content

$search

$search will search for tracks.

Usage

$search[query;type?;format?;limit?;separator?;page?]

Parameters

FieldTypeDescriptionRequired
querystringThe query to search for.true
type?stringSource type: youtube, youtubemusic, applemusic, soundcloud, spotify, deezer, etc. depends on your lavalink nodefalse
format?stringformat to display information about the songs (read bellow)false
limit?numberThe maximum amount of songs that will be returned. default is 10false
separator?stringThe separator between songsfalse
page?numberSearch page. default is 1false

Formatting

FieldReturnsDescription
{position}numberSong position in the queue
{title}stringSong title
{thumbnail}stringSong thumbnail (if any)
{url}stringSong url
{duration}stringSong duration
{artist}stringSong author
{platform}stringTrack player platform
{identifier}stringTrack identifier
{isSeekable}booleanReturn true if the track is seekable
{isStream}booleanReturn true if the track is streaming
{isrc}stringTrack isrc
{durationMs}numberSong duration in milliseconds
{queueLength}numberPlayer queue length
{albumName}stringSong album name (if any)
{albumUrl}stringSong album url (if any)
{artist.artworkUrl}stringArtist artwork url (if any)
{artist.url}stringArtist url (if any)

Example(s)

This will search for video/song titles with the name of “Reckless”:

1
client.command({
2
name: "search",
3
code: `
4
$search[Reckless;youtube;{title} by {artist};10]
5
`
6
});