Skip to content

$search

$search will search for tracks.

Usage

$search[query;type?;format?;list?;separator?]
FieldTypeDescriptionRequired
querystringThe query to search for.true
type?stringThe platform type.
1. youtube (default)
2. spotify (requires auth)
3. soundcloud
false
format?stringThe format in which the songs are returned (read below).false
list?numberThe maximum amount of songs that will be returned.false
separator?stringThe separator to separate returned songs.false

Formatting

OptionReturns
{title}Video/Song Title
{artist}ArtistMay return invalid data with SoundCloud
{duration}DurationReturned in ms
{digitalFormat}DurationReturned in digital format, may be invalid for: Soundcloud, Spotify
{id}Video/Song IDReturned in digital format, may be invalid for: Soundcloud, Spotify
{url}Video/Song URLReturns for YouTube with youtube.com/watch?v= instead of youtu.be

Example(s)

This will search for video/song titles with the name of “aoi.js”:

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