Discord Player

LrcLib

No description provided

LrcLib

new LrcLib(player);
ParameterTypeOptionalDescription
playerPlayerThe player instance

Properties

public api: any

The API URL

public bucket: any

The request bucket

public player: any

The player instance

public timeout: any

The request timeout. Default is 15 seconds.

Methods

public get(params): Promise<LrcSearchResult>

Gets lyrics

ParameterTypeOptionalDescription
paramsLrcGetParamsThe get params

public getById(id): Promise<LrcSearchResult>

Gets lyrics by ID

ParameterTypeOptionalDescription
idnumber`${number}`The lyrics ID

public getCached(params): Promise<LrcSearchResult>

Gets cached lyrics

ParameterTypeOptionalDescription
paramsLrcGetParamsThe get params

public request(path, options?): Promise<T>

Requests the API

ParameterTypeOptionalDescription
pathstringThe path
optionsRequestInitThe request options

public search(params): Promise<Array<LrcSearchResult>>

Searches for lyrics

ParameterTypeOptionalDescription
paramsLrcSearchParamsThe search params

public setRequestTimeout(timeout): void

Sets the request timeout

ParameterTypeOptionalDescription
timeoutnumberThe timeout in milliseconds

public setRetryLimit(limit): void

Sets the retry limit. Default is 5.

ParameterTypeOptionalDescription
limitnumberThe retry limit

On this page