Class LavalinkSession
- Namespace
- DisCatSharp.Lavalink
- Assembly
- DisCatSharp.Lavalink.dll
Represents a LavalinkSession.
public sealed class LavalinkSession
- Inheritance
-
LavalinkSession
- Inherited Members
Properties
- Configuration
Gets the current LavalinkSessionConfiguration.
- ConnectedPlayers
Gets a dictionary of Lavalink guild connections for this node.
- Discord
Gets the Discord client this node connection belongs to.
- IsConnected
Gets whether the client is connected to Lavalink.
- NodeEndpoint
Gets the remote endpoint of this Lavalink node connection.
- Statistics
Gets the current LavalinkStats.
Methods
- ConfigureAsync(LavalinkSessionConfiguration)
Configures the current lavalink session.
- ConnectAsync(DiscordChannel, bool)
Connects to a DiscordChannel.
- DecodeTrackAsync(string)
Decodes an encoded LavalinkTrack.
Might not work with pre 3.0 tracks.
- DecodeTracksAsync(IEnumerable<string>)
Decodes encoded LavalinkTracks.
Might not work with pre 3.0 tracks.
- DestroyAsync()
Destroys the current session, disconnecting all players.
- DestroyGuildPlayersAsync()
Destroys all players.
- GetGuildPlayer(DiscordGuild)
Gets the guild player attached to
guild
.
- GetGuildPlayersAsync()
Gets all guild players.
- GetLavalinkInfoAsync()
Gets the lavalink server information.
- GetLavalinkStatsAsync()
Gets the lavalink server statistics.
- GetLavalinkVersionAsync()
Gets the lavalink server version
- GetLyricsAsync(LavalinkTrack, bool)
Gets the lyrics for a track.
- GetLyricsForCurrentTrackAsync(string, ulong, bool)
Gets the lyrics for a currently playing track.
- GetPlayerAsync(DiscordGuild)
Gets the lavalink player attached to
guild
.Use GetGuildPlayer(DiscordGuild) if you want to interact with the actual player.
- GetPlayersAsync()
Gets all lavalink players.
Use GetGuildPlayersAsync() if you want to interact with the actual players.
- LoadTracksAsync(LavalinkSearchType, string)
Loads tracks by
identifier
. Returns a dynamic object you have to parse with (Type)Result.
- LoadTracksAsync(string)
Loads tracks by
identifier
. Returns a dynamic object you have to parse with (Type)Result.
Events
- GuildPlayerDestroyed
Triggered when a LavalinkGuildPlayer gets destroyed.
- LavalinkSocketErrored
Triggered whenever Lavalink WebSocket throws an exception.
- StatsReceived
Triggered when a LavalinkStats are received.
- WebsocketClosed
Triggered when the websocket to discord gets closed.