documentation
This commit is contained in:
parent
3bcc7adce6
commit
63eb26dc7b
2 changed files with 8 additions and 8 deletions
|
@ -145,11 +145,16 @@ class Player extends EventEmitter<PlayerEvents> {
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {object} SearchResult
|
||||||
|
* @property {Playlist} [playlist] The playlist (if any)
|
||||||
|
* @property {Track[]} tracks The tracks
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* Search tracks
|
* Search tracks
|
||||||
* @param {string|Track} query The search query
|
* @param {string|Track} query The search query
|
||||||
* @param {UserResolvable} requestedBy The person who requested track search
|
* @param {SearchOptions} options The search options
|
||||||
* @returns {Promise<object>}
|
* @returns {Promise<SearchResult>}
|
||||||
*/
|
*/
|
||||||
async search(query: string | Track, options: SearchOptions) {
|
async search(query: string | Track, options: SearchOptions) {
|
||||||
if (query instanceof Track) return { playlist: null, tracks: [query] };
|
if (query instanceof Track) return { playlist: null, tracks: [query] };
|
||||||
|
@ -409,6 +414,7 @@ class Player extends EventEmitter<PlayerEvents> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Registers extractor
|
||||||
* @param {string} extractorName The extractor name
|
* @param {string} extractorName The extractor name
|
||||||
* @param {ExtractorModel|any} extractor The extractor object
|
* @param {ExtractorModel|any} extractor The extractor object
|
||||||
* @param {boolean} [force=false] Overwrite existing extractor with this name (if available)
|
* @param {boolean} [force=false] Overwrite existing extractor with this name (if available)
|
||||||
|
|
|
@ -135,7 +135,6 @@ export interface PlayerOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The extractor model data
|
|
||||||
* @typedef {object} ExtractorModelData
|
* @typedef {object} ExtractorModelData
|
||||||
* @property {object} [playlist] The playlist info (if any)
|
* @property {object} [playlist] The playlist info (if any)
|
||||||
* @property {string} [playlist.title] The playlist title
|
* @property {string} [playlist.title] The playlist title
|
||||||
|
@ -306,7 +305,6 @@ export interface PlayerEvents {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options passed to `<Queue>.play()`
|
|
||||||
* @typedef {object} PlayOptions
|
* @typedef {object} PlayOptions
|
||||||
* @property {boolean} [filtersUpdate=false] If this play was triggered for filters update
|
* @property {boolean} [filtersUpdate=false] If this play was triggered for filters update
|
||||||
* @property {string[]} [encoderArgs=[]] FFmpeg args passed to encoder
|
* @property {string[]} [encoderArgs=[]] FFmpeg args passed to encoder
|
||||||
|
@ -322,7 +320,6 @@ export interface PlayOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options passed to `<Player>.search()`
|
|
||||||
* @typedef {object} SearchOptions
|
* @typedef {object} SearchOptions
|
||||||
* @property {UserResolvable} requestedBy The user who requested this search
|
* @property {UserResolvable} requestedBy The user who requested this search
|
||||||
* @property {QueryType} searchEngine The query search engine
|
* @property {QueryType} searchEngine The query search engine
|
||||||
|
@ -348,7 +345,6 @@ export enum QueueRepeatMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playlist init data
|
|
||||||
* @typedef {object} PlaylistInitData
|
* @typedef {object} PlaylistInitData
|
||||||
* @property {Track[]} tracks The tracks of this playlist
|
* @property {Track[]} tracks The tracks of this playlist
|
||||||
* @property {string} title The playlist title
|
* @property {string} title The playlist title
|
||||||
|
@ -380,7 +376,6 @@ export interface PlaylistInitData {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The JSON representation of a track
|
|
||||||
* @typedef {object} TrackJSON
|
* @typedef {object} TrackJSON
|
||||||
* @property {string} title The track title
|
* @property {string} title The track title
|
||||||
* @property {string} description The track description
|
* @property {string} description The track description
|
||||||
|
@ -407,7 +402,6 @@ export interface TrackJSON {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The JSON representation of the playlist
|
|
||||||
* @typedef {object} PlaylistJSON
|
* @typedef {object} PlaylistJSON
|
||||||
* @property {string} id The playlist id
|
* @property {string} id The playlist id
|
||||||
* @property {string} url The playlist url
|
* @property {string} url The playlist url
|
||||||
|
|
Loading…
Reference in a new issue