Class NodeInfo
Descriptive information about an audio node, from GET /v4/info.
public sealed record NodeInfo : IEquatable<NodeInfo>
- Inheritance
-
NodeInfo
- Implements
- Inherited Members
Remarks
Served by both servers, with server-specific members null on the other kind.
This read is strict beyond the number-in-string tolerance the shared options carry (a stringified build
time still parses). One member in an unexpected shape (a stringified boolean, a fractional build time, a
non-string list entry) fails the whole parse, surfaced as a RestException that carries the
response's OK status.
The connect probe reads the same endpoint tolerantly and only needs a readable version.semver, so a
non-conforming server can be connected and playing while this read of its info fails.
Properties
BuildTime
Build time as a date, MinValue when out of range or when the server reports its missing-value sentinel (-1 on Lavalink dev builds and NodeLink without build info).
[JsonIgnore]
public DateTimeOffset BuildTime { get; }
Property Value
BuildTimeMilliseconds
Build time in milliseconds since the Unix epoch.
[JsonPropertyName("buildTime")]
[JsonInclude]
public long BuildTimeMilliseconds { get; }
Property Value
Filters
Audio filters the server has enabled, such as equalizer or timescale.
[JsonPropertyName("filters")]
[JsonInclude]
public IReadOnlyList<string> Filters { get; }
Property Value
Git
The git revision the server was built from.
[JsonPropertyName("git")]
[JsonInclude]
public NodeInfoGit Git { get; }
Property Value
IsNodeLink
Whether the server identified itself as NodeLink through isNodelink, null when absent, i.e. on
Lavalink.
[JsonPropertyName("isNodelink")]
[JsonInclude]
public bool? IsNodeLink { get; }
Property Value
- bool?
Jvm
The JVM version the server runs on.
[JsonPropertyName("jvm")]
[JsonInclude]
public string? Jvm { get; }
Property Value
Remarks
Lavalink only.
Lavaplayer
Version of lavaplayer, the audio engine Lavalink plays through.
[JsonPropertyName("lavaplayer")]
[JsonInclude]
public string? Lavaplayer { get; }
Property Value
Remarks
Lavalink only.
Node
The Node.js version the server runs on.
[JsonPropertyName("node")]
[JsonInclude]
public string? Node { get; }
Property Value
Remarks
NodeLink only.
Plugins
The plugins the server loaded.
[JsonPropertyName("plugins")]
[JsonInclude]
public IReadOnlyList<NodeInfoPlugin> Plugins { get; }
Property Value
Runtime
[JsonIgnore]
public string? Runtime { get; }
Property Value
Remarks
Lavaplayer and Voice differ in shape and stay separate.
SourceManagers
Source managers the server has enabled, such as youtube or soundcloud.
[JsonPropertyName("sourceManagers")]
[JsonInclude]
public IReadOnlyList<string> SourceManagers { get; }
Property Value
Version
The version of the server.
[JsonPropertyName("version")]
[JsonInclude]
public NodeInfoVersion Version { get; }
Property Value
Voice
The voice library the server speaks Discord voice through.
[JsonPropertyName("voice")]
[JsonInclude]
public NodeInfoVoice? Voice { get; }
Property Value
Remarks
NodeLink only.
Methods
Equals(NodeInfo?)
Indicates whether both infos describe the same server with the same sources, filters and plugins.
public bool Equals(NodeInfo? other)
Parameters
otherNodeInfoThe info to compare with.
Returns
- bool
Whether the members match, the collections compared by content.
GetHashCode()
Returns a hash of the scalar members, the collections stay out of it.
public override int GetHashCode()
Returns
- int
The hash code.