Skip to content

Payloads

Response payloads returned by Node API methods (fetch_info, fetch_stats, fetch_players, etc.). Primarily useful for diagnostics, monitoring, and extensions.


Stats

StatsResponsePayload

StatsResponsePayload(data: StatsResponse)

Payload received when using :meth:~revvlink.Node.fetch_stats

Attributes:

Name Type Description
players int

The amount of players connected to the node (Lavalink).

playing int

The amount of players playing a track.

uptime int

The uptime of the node in milliseconds.

memory :class:`revvlink.StatsEventMemory`

See Also: :class:revvlink.StatsEventMemory

cpu :class:`revvlink.StatsEventCPU`

See Also: :class:revvlink.StatsEventCPU

frames :class:`revvlink.StatsEventFrames` | None

See Also: :class:revvlink.StatsEventFrames. This could be None.


Player

PlayerResponsePayload

PlayerResponsePayload(data: PlayerResponse)

Payload received when using :meth:~revvlink.Node.fetch_player_info or :meth:~revvlink.Node.fetch_players

Attributes:

Name Type Description
guild_id int

The guild ID as an int that this player is connected to.

track :class:`revvlink.Playable` | None

The current track playing on Lavalink. Could be None if no track is playing.

volume int

The current volume of the player.

paused bool

A bool indicating whether the player is paused.

state :class:`revvlink.PlayerStatePayload`

The current state of the player. See: :class:revvlink.PlayerStatePayload.

voice_state :class:`revvlink.VoiceStatePayload`

The voice state infomration received via Discord and sent to Lavalink. See: :class:revvlink.VoiceStatePayload.

filters :class:`revvlink.Filters`

The :class:revvlink.Filters currently associated with this player.


PlayerStatePayload

PlayerStatePayload(data: PlayerState)

Represents the PlayerState information received via :meth:~revvlink.Node.fetch_player_info or :meth:~revvlink.Node.fetch_players

Attributes:

Name Type Description
time int

Unix timestamp in milliseconds received from Lavalink.

position int

The position of the track in milliseconds received from Lavalink.

connected bool

Whether Lavalink is connected to the voice gateway.

ping int

The ping of the node to the Discord voice server in milliseconds (-1 if not connected).


VoiceStatePayload

VoiceStatePayload(data: VoiceStateResponse)

Represents the VoiceState information received via :meth:~revvlink.Node.fetch_player_info or :meth:~revvlink.Node.fetch_players. This is the voice state information received via Discord and sent to your Lavalink node.

Attributes:

Name Type Description
token str | None

The Discord voice token authenticated with. This is not the same as your bots token. Could be None.

endpoint str | None

The Discord voice endpoint connected to. Could be None.

session_id str | None

The Discord voice session ID autheticated with. Could be None.


Node Info

InfoResponsePayload

InfoResponsePayload(data: InfoResponse)

Payload received when using :meth:~revvlink.Node.fetch_info

Attributes:

Name Type Description
version :class:`VersionResponsePayload`

The version info payload for this Lavalink node in the :class:VersionResponsePayload object.

build_time :class:`datetime.datetime`

The timestamp when this Lavalink jar was built.

git :class:`GitResponsePayload`

The git info payload for this Lavalink node in the :class:GitResponsePayload object.

jvm str

The JVM version this Lavalink node runs on.

lavaplayer str

The Lavaplayer version being used by this Lavalink node.

source_managers list[str]

The enabled source managers for this node.

filters list[str]

The enabled filters for this node.

plugins list[:class:`PluginResponsePayload`]

The enabled plugins for this node.


VersionResponsePayload

VersionResponsePayload(data: VersionPayload)

Represents Version information received via :meth:revvlink.Node.fetch_info

Attributes:

Name Type Description
semver str

The full version string of this Lavalink server.

major int

The major version of this Lavalink server.

minor int

The minor version of this Lavalink server.

patch int

The patch version of this Lavalink server.

pre_release str

The pre-release version according to semver as a . separated list of identifiers.

build str | None

The build metadata according to semver as a . separated list of identifiers. Could be None.


GitResponsePayload

GitResponsePayload(data: GitPayload)

Represents Git information received via :meth:revvlink.Node.fetch_info

Attributes:

Name Type Description
branch str

The branch this Lavalink server was built on.

commit str

The commit this Lavalink server was built on.

commit_time :class:`datetime.datetime`

The timestamp for when the commit was created.


PluginResponsePayload

PluginResponsePayload(data: PluginPayload)

Represents Plugin information received via :meth:revvlink.Node.fetch_info

Attributes:

Name Type Description
name str

The plugin name.

version str

The plugin version.


NodeInfo dataclass

NodeInfo(
    version: str,
    jvm: str,
    lavaplayer: str,
    source_managers: list[str],
    plugins: list[PluginInfo],
    filters: list[str],
)

Dataclass representing node information from a Lavalink server.

This is a convenience dataclass for accessing node information including source managers and plugins.

Attributes:

Name Type Description
version str

The Lavalink server version.

jvm str

The JVM version the server is running on.

lavaplayer str

The Lavaplayer version being used.

source_managers list[str]

The enabled source managers.

plugins list[PluginInfo]

The enabled plugins.

filters list[str]

The enabled filters.

from_payload classmethod

from_payload(payload: InfoResponsePayload) -> NodeInfo

Create a NodeInfo instance from an InfoResponsePayload.

Parameters:

Name Type Description Default
payload InfoResponsePayload

The payload to convert.

required

Returns:

Type Description
NodeInfo

The converted NodeInfo instance.

has_source

has_source(source: str) -> bool

Check if a source manager is available.

Parameters:

Name Type Description Default
source str

The source manager name to check (e.g., "youtube", "soundcloud").

required

Returns:

Type Description
bool

True if the source manager is available.

has_plugin

has_plugin(plugin: str) -> bool

Check if a plugin is available.

Parameters:

Name Type Description Default
plugin str

The plugin name to check (e.g., "lavasrc", "spsearch").

required

Returns:

Type Description
bool

True if the plugin is available.


PluginInfo dataclass

PluginInfo(name: str, version: str)

Dataclass representing plugin information from a Lavalink node.

This is a convenience dataclass for accessing plugin information.

Attributes:

Name Type Description
name str

The plugin name.

version str

The plugin version.