Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptySearchResult = errors.New("empty search result")
)
Functions ¶
This section is empty.
Types ¶
type SearchResult ¶
type SearchResult struct {
Tracks []lavalink.Track `json:"tracks"`
Albums []lavalink.Playlist `json:"albums"`
Artists []lavalink.Playlist `json:"artists"`
Playlists []lavalink.Playlist `json:"playlists"`
Texts []Text `json:"texts"`
}
func LoadSearch ¶
func LoadSearch(client disgolink.RestClient, query string, types []SearchType) (*SearchResult, error)
LoadSearch loads a search result from Lavalink & returns a *SearchResult or ErrEmptySearchResult if no results were found or lavalink.Error if something went wrong with Lavalink or any other error.
type SearchType ¶
type SearchType string
const ( SearchTypeTrack SearchType = "track" SearchTypeAlbum SearchType = "album" SearchTypeArtist SearchType = "artist" SearchTypePlaylist SearchType = "playlist" SearchTypeText SearchType = "text" )
Click to show internal directories.
Click to hide internal directories.