diff --git a/src/Player.ts b/src/Player.ts index bd492fa..509c421 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -145,11 +145,16 @@ class Player extends EventEmitter { return prev; } + /** + * @typedef {object} SearchResult + * @property {Playlist} [playlist] The playlist (if any) + * @property {Track[]} tracks The tracks + */ /** * Search tracks * @param {string|Track} query The search query - * @param {UserResolvable} requestedBy The person who requested track search - * @returns {Promise} + * @param {SearchOptions} options The search options + * @returns {Promise} */ async search(query: string | Track, options: SearchOptions) { if (query instanceof Track) return { playlist: null, tracks: [query] }; @@ -409,6 +414,7 @@ class Player extends EventEmitter { } /** + * Registers extractor * @param {string} extractorName The extractor name * @param {ExtractorModel|any} extractor The extractor object * @param {boolean} [force=false] Overwrite existing extractor with this name (if available) diff --git a/src/types/types.ts b/src/types/types.ts index bc8faab..1a2c0bb 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -135,7 +135,6 @@ export interface PlayerOptions { } /** - * The extractor model data * @typedef {object} ExtractorModelData * @property {object} [playlist] The playlist info (if any) * @property {string} [playlist.title] The playlist title @@ -306,7 +305,6 @@ export interface PlayerEvents { } /** - * Options passed to `.play()` * @typedef {object} PlayOptions * @property {boolean} [filtersUpdate=false] If this play was triggered for filters update * @property {string[]} [encoderArgs=[]] FFmpeg args passed to encoder @@ -322,7 +320,6 @@ export interface PlayOptions { } /** - * Options passed to `.search()` * @typedef {object} SearchOptions * @property {UserResolvable} requestedBy The user who requested this search * @property {QueryType} searchEngine The query search engine @@ -348,7 +345,6 @@ export enum QueueRepeatMode { } /** - * Playlist init data * @typedef {object} PlaylistInitData * @property {Track[]} tracks The tracks of this playlist * @property {string} title The playlist title @@ -380,7 +376,6 @@ export interface PlaylistInitData { } /** - * The JSON representation of a track * @typedef {object} TrackJSON * @property {string} title The track title * @property {string} description The track description @@ -407,7 +402,6 @@ export interface TrackJSON { } /** - * The JSON representation of the playlist * @typedef {object} PlaylistJSON * @property {string} id The playlist id * @property {string} url The playlist url