Skip to main content
Version: v3.0.0 (current)

NodeInfoLoad

Since 3.0.0. Exported type of the private state a node uses to load its /v4/info once per connection. Bots do not read it: use node.ensureInfo(), node.info and node.type.

Definition​

export interface NodeInfoLoad {
/** Counts socket connections, so info loaded on an earlier connection is loaded again on the next one. */
generation: number;
/** The connection count when `info` was loaded. */
loadedGeneration: number | null;
/** The `/v4/info` request in flight, shared by every caller of `ensureInfo`. */
request: {
generation: number;
promise: Promise<LavalinkInfo>;
} | null;
}