LavalinkClient class

Main Lavalink client

Constructors

LavalinkClient({required String host, required int port, required String password, required String userId, bool useSSL = false, Duration timeout = const Duration(seconds: 10), Duration heartbeatInterval = const Duration(seconds: 30), int maxReconnectAttempts = 10})

Properties

eventStream → Stream
no setter
hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
no setter
rest → LavalinkRestClient
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
webSocket → LavalinkWebSocket
final

Methods

connect({bool enableResuming = false, int resumeTimeout = 60}) → Future<void>
Connect to Lavalink
disconnect() → Future<void>
Disconnect from Lavalink
dispose() → Future<void>
Dispose the client
getInfo() → Future<Info>
Get Lavalink server information
getPlayer(String guildId) → LavalinkPlayerController
Get or create player for guild
getStats() → Future<Stats>
Get Lavalink server statistics
getVersion() → Future<String>
Get Lavalink version
loadPlaylist(String url) → Future<LoadResult>
Load playlist from URL
loadTracks(String identifier) → Future<LoadResult>
Load tracks from URL or identifier
multiSourceSearch(String query, {List<String> sources = const ['ytsearch', 'scsearch']}) → Future<Map<String, LoadResult>>
Search across multiple sources simultaneously Returns results from all sources that respond
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removePlayer(String guildId) → Future<void>
Remove player for guild
Search for tracks
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited