Payloads¶
Response payloads returned by Node API methods (fetch_info, fetch_stats, fetch_players, etc.).
Primarily useful for diagnostics, monitoring, and extensions.
Stats¶
StatsResponsePayload ¶
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: |
cpu |
:class:`revvlink.StatsEventCPU`
|
See Also: :class: |
frames |
:class:`revvlink.StatsEventFrames` | None
|
See Also: :class: |
Player¶
PlayerResponsePayload ¶
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 |
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: |
voice_state |
:class:`revvlink.VoiceStatePayload`
|
The voice state infomration received via Discord and sent to Lavalink.
See: :class: |
filters |
:class:`revvlink.Filters`
|
The :class: |
PlayerStatePayload ¶
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 ¶
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 |
endpoint |
str | None
|
The Discord voice endpoint connected to. Could be |
session_id |
str | None
|
The Discord voice session ID autheticated with. Could be |
Node Info¶
InfoResponsePayload ¶
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: |
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: |
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 ¶
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 |
build |
str | None
|
The build metadata according to semver as a |
GitResponsePayload ¶
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 ¶
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
¶
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 ¶
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 ¶
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
¶
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. |