Skip to content

Commit

Permalink
Upgrade lavalink node info
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Feb 6, 2024
1 parent 43f1de1 commit 72409bf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,18 @@ class StatsCommand : Command() {
availableNodes.forEachIndexed { index, node ->
val stats = node.stats ?: return@forEachIndexed

val nodeInfo = node.getNodeInfo().block()!!

embed.addField(
"Lavalink node #$index",
"Node #$index ${node.name} (v${nodeInfo.version.semver}/jvm ${nodeInfo.jvm}/LP ${nodeInfo.lavaplayer})",
"""**Uptime:** ${AirUtils.getUptime(stats.uptime)}
|**CPU cores:** ${stats.cpu.cores}
|**System Load:** ${stats.cpu.systemLoad}%
|**Used memory:** ${stats.memory.used shr 20}MB
|**Free memory:** ${stats.memory.free shr 20}MB
|**Players:** ${stats.players}
|**Players playing:** ${stats.playingPlayers}
|**Sources:** ${nodeInfo.sourceManagers.joinToString()}
""".trimMargin(),
true
)
Expand Down

0 comments on commit 72409bf

Please sign in to comment.