Skip to content
Music searchMusic

$searchMusic[]

Searches YouTube (or loads the given URL) and returns a JSON array of up to limit results, each with title, author and url. Nothing is added to the queue. Use $jsonParse and $jsonValue[index;title] to read it. An empty query raises an error. Requires a configured music (Lavalink) service.

Syntax

bdfd
$searchMusic[query;limit?]

Parameters

Parameter Description
query Required - Song name or URL.
limit Optional - Number of results, 1 to 10 (default 5).

Examples

Example

$jsonParse[$searchMusic[$message;3]]
$description[First result: **$jsonValue[0;title]** by $jsonValue[0;author]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.