FunctionalLoadResultHandler

class FunctionalLoadResultHandler @JvmOverloads constructor(trackLoadedConsumer: Consumer<TrackLoaded>?, playlistLoadedConsumer: Consumer<PlaylistLoaded>? = null, searchResultConsumer: Consumer<SearchResult>? = null, noMatchesHandler: Runnable? = null, loadFailedConsumer: Consumer<LoadFailed>? = null) : AbstractAudioLoadResultHandler

Helper class for creating an AbstractAudioLoadResultHandler using only methods that can be passed as lambdas.

Parameters

trackLoadedConsumer

gets called when a track has loaded

playlistLoadedConsumer

gets called when a playlist has loaded

searchResultConsumer

gets called when a search result has loaded

noMatchesHandler

gets called when there are no matches for your input

loadFailedConsumer

gets called in case of a load failure

Constructors

Link copied to clipboard
constructor(trackLoadedConsumer: Consumer<TrackLoaded>?, playlistLoadedConsumer: Consumer<PlaylistLoaded>? = null, searchResultConsumer: Consumer<SearchResult>? = null, noMatchesHandler: Runnable? = null, loadFailedConsumer: Consumer<LoadFailed>? = null)

Functions

Link copied to clipboard
open override fun accept(loadResult: LavalinkLoadResult)
Link copied to clipboard
Link copied to clipboard
open override fun loadFailed(result: LoadFailed)
Link copied to clipboard
open override fun noMatches()
Link copied to clipboard
open override fun onPlaylistLoaded(result: PlaylistLoaded)
Link copied to clipboard
open override fun onSearchResultLoaded(result: SearchResult)
Link copied to clipboard
open override fun ontrackLoaded(result: TrackLoaded)