lavalink_rs.model.player

class Player:

Information about the player of a guild.

volume

The current volume of the player.

paused

Whether the player is paused or not.

filters

The filters currently in use by the player

state

The state of the player.

track

The currently playing track.

guild_id
voice

The voice connection information of the player. Channel ID will always be None.

class State:
connected

Whether Lavalink is connected to the discord voice gateway.

time

Unix timestamp in milliseconds.

ping

The latency of the node to the Discord voice gateway in milliseconds.

None if not connected.

position

The current position of the track in milliseconds.

class ConnectionInfo:

Discord voice websocket connection information.

def fix(self, /):

The type of the None singleton.

endpoint

The Discord voice endpoint to connect to.

Provided by Voice Server Update.

session_id

The Discord voice session id to authenticate with.

Not to be confused by the Lavalink session_id.

Provided by Voice State Update.

token

The Discord voice token to authenticate with.

Provided by Voice Server Update.

channel_id

The Discord voice channel ID the bot is connecting to.

Must be Some on player updates. Will be none on get players.

Provided by Voice Server Update.

class Filters:
tremolo
plugin_filters
low_pass
distortion
channel_mix
equalizer
karaoke
volume
rotation
timescale
vibrato
class ChannelMix:

Mixes both channels (left and right), with a configurable factor on how much each channel affects the other.

With the defaults, both channels are kept independent of each other. Setting all factors to 0.5 means both channels get the same audio. All values are (0.0 <= x <= 1.0)

right_to_right
left_to_left
left_to_right
right_to_left
class Distortion:

Distortion effect.

It can generate some pretty unique audio effects.

cos_scale
sin_scale
scale
tan_scale
cos_offset
offset
tan_offset
sin_offset
class Equalizer:

A fixed band equalizer.

gain

The gain (-0.25 to 1.0)

-0.25 means the given band is completely muted, and 0.25 means it is doubled. Modifying the gain could also change the volume of the output.

band

The band (0 to 14)

class Karaoke:

Uses equalization to eliminate part of a band, usually targeting vocals.

level

The level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect)

filter_band

The filter band (in Hz)

filter_width

The filter width.

mono_level

The mono level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect)

class LowPass:

Higher frequencies get suppressed, while lower frequencies pass through this filter.

smoothing

The smoothing factor (1.0 < x)

Any smoothing values equal to or less than 1.0 will disable the filter.

class Rotation:

Rotates the sound around the stereo channels/user headphones (aka Audio Panning).

It can produce an effect similar to this without the reverb.

rotation_hz

The frequency of the audio rotating around the listener in Hz.

0.2 is similar to the example video above

class Timescale:

Changes the speed, pitch, and rate.

All default to 1.0.

speed

The playback speed (0.0 <= x)

rate

The rate (0.0 <= x)

pitch

The pitch (0.0 <= x)

class TremoloVibrato:

Tremolo uses amplification to create a shuddering effect, where the volume quickly oscillates.

Demo

Vibrato is similar to tremolo, but rather than oscillating the volume, it oscillates the pitch.

frequency

For tremolo (0.0 < x) For vibrato (0.0 < x <= 14.0)

depth

For both tremolo and vibrato (0.0 < x <= 1.0)