mirror of
https://github.com/a-sync/game-server-watcher.git
synced 2026-07-22 13:43:34 -04:00
fix: discord player count over 100
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user