Closed Joniii11 closed 4 months ago
Fetch the status
or stats
as its only an valid endpoint.
I tried to reproduce this in any way possible, however I wasn't able to get playingPlayers
value from /v4/stats
below zero
Are you using the latest version?
Are you using the latest version?
As it mentioned in the issue body. They are using latest version (latest commit too)
Except for the commit pushed by Pedro 2hrs back.
const totalPlayingPlayersString: string[] = [];
let totalPlayingPlayers = 0;
client.poru.nodes.forEach(async (node) => {
const stats = node.stats ? node.stats.playingPlayers : (await node.rest.get<NodeStats>(`/v4/stats`)).playingPlayers;
totalPlayingPlayers += stats;
totalPlayingPlayersString.push(`\nPlayers: ${stats}`);
});
I am using that to get the stats tho, so it is most likely a issue with NodeLink
NodeLink version
2.0.1 (ce2d11259bd2c83dbac0a8875e54a32b4dbe62e4)
Description
So basically the playing players number go below zero.![image](https://github.com/PerformanC/NodeLink/assets/88550325/0e791c75-fc52-4e58-b567-ec68364eb8fd)
Client
Modified Poru V4.2
Steps to reproduce
Fetch the status and return the playing player count.
Example code
Just fetch the status
Confirmations
Code of Conduct