UNPKG

damonjs

Version:

A modified Shoukaku wrapper with enhanced queue support.

70 lines (69 loc) 1.97 kB
import { DamonJs } from '../../DamonJs'; import { RawTrack, ResolveOptions } from '../../Modules/Interfaces'; import { Track } from 'shoukaku'; export declare class DamonJsTrack { private readonly raw; /** * DamonJs Instance */ damonjs: DamonJs | undefined; /** * Track Requester */ requester: unknown; /** Track's Base64 */ encoded: string; /** Track's source */ sourceName: string; /** Track's title */ title: string; /** Track's URI */ uri: string | undefined; /** Track's identifier */ identifier: string; /** Whether the track is seekable */ isSeekable: boolean; /** Whether the track is a stream */ isStream: boolean; /** Track's author */ author: string; /** Track's length */ length: number; /** Track's position (I don't know this) */ position: number; /** Track's thumbnail, if available */ artworkUrl: string | undefined; /** The YouTube/soundcloud URI for spotify and other unsupported source */ realUri: string | null; /** Plugin Information (I don't know this) */ pluginInfo: unknown; /** International Standard Recording Code */ isrc: string | undefined; resolvedBySource: boolean; readonly data: Map<string, any>; constructor(raw: Track, requester: unknown); /** * Get json of this track * @returns {RawTrack} */ getRaw(): RawTrack; /** * Set damonjs instance * @param damonjs DamonJs instance * @returns DamonJsTrack */ setDamonJs(damonjs: DamonJs): DamonJsTrack; /** * Whether the track is ready to play or need to be solved */ get readyToPlay(): boolean; /** * Resolve the track * @param options Resolve options * @returns Promise<DamonJsTrack> */ resolve(options: ResolveOptions): Promise<DamonJsTrack>; private getTrackScore; private filterPlayableTrack; private getTrack; }