fix: discord player count over 100

This commit is contained in:
Smith
2023-11-18 17:34:25 +01:00
parent c104e763f0
commit d3d82c3c79
2 changed files with 3 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ docker-compose up
## Hosting via NodeJS runtime
Make sure all the [requirements](#requirements) are met!
### Build artifacts (optional)
### Build artifacts
```
npm i
npm run build

View File

@@ -128,7 +128,7 @@ export class GameServer {
token: this.config.token
} as QueryOptions) as qRes;
const raw = res.raw as { game: string; folder: string; };
const raw = res.raw as { game?: string; folder?: string; presence_count?: number; };
const game = raw.game || raw.folder || this.config.type;
const players: GsPlayer[] = res.players.map((p: Player) => {
@@ -140,7 +140,7 @@ export class GameServer {
name: res.name,
game: game,
map: res.map || '',
playersNum: res.numplayers || res.players.length,
playersNum: res.numplayers || raw.presence_count || res.players.length,
playersMax: res.maxplayers,
players
};