GameDig is a robust Node.js library engineered for querying the status of a vast array of game and voice servers. The current stable version, 5.3.2, offers an extensive solution for developers needing to fetch public status information from over 320 different game titles and services, along with general protocols. The library is actively maintained, with updates and breaking changes between major versions (e.g., v4 to v5) well-documented in `MIGRATE_IDS.md` and `CHANGELOG.md`. Its key differentiators include broad game support, a straightforward API compatible with both CommonJS and ESM environments, and its dual functionality as a command-line executable. It's a reliable choice for integrating game server status monitoring into applications, supported by an active community on Discord and GitHub.
npm install gamedigVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to query the status of a game server (e.g., Minecraft, CS:GO) using GameDig's static `query` method, including success and error handling.
Consult the `MIGRATE_IDS.md` document in the repository to update game IDs in your application. Also, review the `CHANGELOG.md` for other API adjustments.
Always refer to the `GAMES_LIST.md` file for details on required fields and notes specific to each game. If a query fails, try explicitly setting the `port` option.
If queries aren't working as expected, attempt to specify the server's dedicated query port (if known and different from the game port) using the `port` option in the query configuration.
To bypass DNS resolution and connect directly to an IP, use `address: '192.168.1.1'` instead of or in conjunction with `host` (as some protocols still use `host` for other reasons).
Verify the server's status and network connectivity. Double-check the `host` and `port` parameters for correctness. Ensure no firewalls are blocking the outbound connection.
Consult the `MIGRATE_IDS.md` and `GAMES_LIST.md` files to find the current and correct game identifier for the server you are trying to query.
Ensure the `type` field corresponds to a valid game ID from `GAMES_LIST.md` or a supported `protocol-[name]` as defined in the library's `protocols/index.js`.
No dependency data recorded yet.