lavalink_rs
The main client, where everything gets done, from events to requests to management.
The player context.
Event that triggers when a player updates.
Event that triggers when a track starts playing.
Event that triggers when a track finishes playing.
Event that triggers when a track raises an exception on the Lavalink server.
Event that triggers when a track gets stuck while playing.
Event that triggers when the websocket connection to the voice channel closes.
Updates or creates the player for this guild.
Updates the session with the resuming state and timeout.
Resolves audio tracks for use with the update_player
endpoint.
Parameters
identifier
: A track identifier.- Can be a url: "https://youtu.be/watch?v=DrM2lo6B04I"
- A unique identifier: "DrM2lo6B04I"
- A search: "ytsearch:Ne Obliviscaris - Forget Not"
Request Lavalink statistics.
NOTE: The frame stats will never be returned.
Decode a single track into its info.
Parameters
track
: base64 encoded track data.
Decode multiple tracks into their info.
Parameters
tracks
: base64 encoded tracks.
A builder for the node.
Example
# use crate::model::UserId;
let node_builder = NodeBuilder {
hostname: "localhost:2333".to_string(),
password: "youshallnotpass".to_string(),
user_id: UserId(551759974905151548),
..Default::default()
};
A track that's inside the queue.
A reference to the player queue
A discord User ID.
A discord Channel ID.
A discord Guild ID.