Documentation
Classes
discord-player
SearchResult

SearchResult

new SearchResult(player, _data)
ParameterTypeOptionalDescription
playerPlayer-
_dataSearchResultData-

Properties

private _data: SearchResultData

public player: Player

public extractor: null | BaseExtractor

The extractor

public playlist: undefined | null | Playlist

Playlist result

public query: string

The search query

public queryType: SearchQueryType | any

The search query type

public requestedBy: null | User

Requested by

public tracks: Array<Track>

Tracks result

Methods

public execute(): Promise<SearchResult>

Re-execute this search

public hasPlaylist(): boolean

If this search result has playlist

public hasTracks(): boolean

If this search result has tracks

public isEmpty(): boolean

If this search result is empty

public setExtractor(extractor): SearchResult

ParameterTypeOptionalDescription
extractorBaseExtractor-

public setPlaylist(playlist): SearchResult

ParameterTypeOptionalDescription
playlistPlaylist-

public setQuery(query): SearchResult

ParameterTypeOptionalDescription
querystring-

public setQueryType(type): SearchResult

ParameterTypeOptionalDescription
typeSearchQueryType | any-

public setRequestedBy(user): SearchResult

ParameterTypeOptionalDescription
userUser-

public setTracks(tracks): SearchResult

ParameterTypeOptionalDescription
tracksArray<Track>-

public toJSON(): { extractor: null | string,playlist: null | PlaylistJSON,query: string,queryType: SearchQueryType | any,requestedBy: null | Object,tracks: Array<TrackJSON> }

JSON representation of this search