{"id":22420592,"url":"https://github.com/a-sync/game-server-watcher","last_synced_at":"2025-04-09T15:07:32.079Z","repository":{"id":41351574,"uuid":"476074389","full_name":"a-sync/game-server-watcher","owner":"a-sync","description":"A simple discord/telegram/slack bot that can be hosted on a free service to monitor your game servers and players in style 😎","archived":false,"fork":false,"pushed_at":"2025-03-30T17:08:57.000Z","size":13359,"stargazers_count":54,"open_issues_count":0,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T15:07:13.539Z","etag":null,"topics":["discord-bot","game-server","gamedig","slack-bot","steam-api","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-sync.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["a-sync"],"ko_fi":"aasync","liberapay":"a-sync","issuehunt":"a-sync"}},"created_at":"2022-03-30T22:45:01.000Z","updated_at":"2025-04-09T09:16:02.000Z","dependencies_parsed_at":"2023-10-16T18:29:04.503Z","dependency_job_id":"16a9fe9c-2b09-4dd0-8228-95c7eb276be8","html_url":"https://github.com/a-sync/game-server-watcher","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sync%2Fgame-server-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sync%2Fgame-server-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sync%2Fgame-server-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-sync%2Fgame-server-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-sync","download_url":"https://codeload.github.com/a-sync/game-server-watcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055284,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-bot","game-server","gamedig","slack-bot","steam-api","telegram-bot"],"created_at":"2024-12-05T16:20:25.469Z","updated_at":"2025-04-09T15:07:32.060Z","avatar_url":"https://github.com/a-sync.png","language":"TypeScript","funding_links":["https://github.com/sponsors/a-sync","https://ko-fi.com/aasync","https://liberapay.com/a-sync","https://issuehunt.io/r/a-sync"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://github.com/a-sync/game-server-watcher/assets/14183614/66a8ffa8-c547-4f9c-b312-4c855da80c20\" width=\"40\" align=\"left\"\u003e Game Server Watcher\nA simple discord/telegram/slack bot that can be hosted on a free service to monitor your game servers and players in style. 😎  \n\n# About the Project\nThe main goals of this repo:\n 1. create a (simple, but capable) service/bot to monitor game servers\n    1. get gamedig \u0026 steam api server info (_eg.: server name, map, players, etc._)\n    1. relay real time server information to various channels via APIs (_eg.: discord, telegram, slack etc._)\n 1. should be able to host on a free service (_target atm. is fly.io (node.js 20)_)\n 1. graciously add more features based on community feedback via [discord \u003cimg src=\"https://cdn.discordapp.com/icons/935911764023996527/1b791c9533f24a6bc23dbf5b2c134436.png?size=20\" width=\"20\" align=\"absmiddle\" title=\"ACME Corp.\" alt=\"\"\u003e](https://discord.gg/4tsbftsGJz) and [github :octocat:](https://github.com/a-sync/game-server-watcher/discussions/new?category=ideas-requests)\n\n# Screenshots\n\u003cimg src=\"https://user-images.githubusercontent.com/14183614/162092529-e1645b44-2650-4893-8123-7ba187b1f51c.png\" height=\"520\"\u003e \u003cimg src=\"https://user-images.githubusercontent.com/14183614/162092488-f28bd60c-88bf-4b1e-a31e-d7dca51d8c28.png\" height=\"520\"\u003e \u003cimg src=\"https://github.com/a-sync/game-server-watcher/assets/14183614/0461ad76-bb13-468c-a7b3-437d6a3cea63\" height=\"520\"\u003e \u003cimg src=\"https://github.com/a-sync/game-server-watcher/assets/14183614/ee0ef0de-83bc-42ae-8f64-62f481f6ba8f\" height=\"520\"\u003e \n\n# Project Status\nThe code itself is stable and continuously tested/deployed from the master branch.  \n\nThe project is in a mature stage. New customization options and features are added as requested.  \n\n### Possible features and configuration options to add in the future\n * ~~optional player list~~\n   * customizable fields (time, name, ping, score)\n   * configurable field \u0026 order to sort by\n   * max length for player names \u0026 nr of players\n * ~~optional graph chart~~\n * custom embed fields for discord/slack\n * ~~configurable time zone offset for graph x-axis~~\n * refresh on reaction\n * watched players (notify when a watched player enters/leaves the server)\n * detect when the server goes offline, notify when player number crosses a threshold\n * bot commands (reinit message, cleanup, start/stop, post server status, configure)\n * more integrations: ~~telegram~~, ~~slack~~, ms teams, twillio (email, sms)\n * ~~web ui to manage \u0026 configure the servers and bots~~\n * put custom information in the channel name or bot status (online status indicator, number of players, map)\n * github action workflows to deploy to other cloud providers (aws, linode, atlantic, vultr, pikapods, okteto, ibm cloud etc.)\n * SQL, JSON or object store database support (postgres, redis etc.)\n * run as stateless serverless function (aws lambda, azure function, heroku, vercel, fly.io machines etc.)\n * ~~pterodactyl egg release~~\n\n# Getting Started\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.  \n\n## Requirements\n[node.js](https://nodejs.org/) _(version 16.20.0 or later)_  \n\n## Getting the source\nThis project is [hosted on github](https://github.com/a-sync/game-server-watcher). You can clone this project directly using this command:\n\n```\ngit clone git@github.com:a-sync/game-server-watcher.git\n```\n\nThe latest source can also be downloaded as a [zip archive](https://github.com/a-sync/game-server-watcher/archive/refs/heads/master.zip).  \n\n## Installation\nUse npm or yarn to install/update all the dependencies:\n```\nnpm i\n```\n\nBuild the artifacts from source:\n```\nnpm run build\n```\n\n## Usage\nStart the built artifacts:\n```\nnpm start\n```\n\nBuild, start and auto restart on source changes:\n```\nnpm run dev\n```\n\n## Settings\nThe behaviour of the watcher service can be configured via environmental variables (env vars).  \n`.env` ([dotenv](https://www.npmjs.com/package/dotenv)) file is also supported, to look at the available values and defaults check the [.env.example](./.env.example) file.  \nTo get started, you can simply rename the `.env.example` file to `.env`.  \n\nRefer to the wiki on how to acquire tokens for:\n * [steam](https://github.com/a-sync/game-server-watcher/wiki/Steam-Web-API-key)\n * [discord](https://github.com/a-sync/game-server-watcher/wiki/Discord-bot-token)\n * [telegram](https://github.com/a-sync/game-server-watcher/wiki/Telegram-bot-token)\n * [slack](https://github.com/a-sync/game-server-watcher/wiki/Slack-bot-token)\n\n## Managing the service\n**GSW Control Panel** is a web based UI that let's you configure and control the Game Server Watcher instance.  \nThe web app is served at `http://localhost:8080` by default.  \n_Make sure to configure the `SECRET` env var!_  \n\n### Configuration\nUpdates the configuration file and restarts the service.\n\n### Flush data\n#### Flush game servers data\nRemoves population history data. (configured by _Graph history time span_ server option)\n\n#### Flush discord data\nIf the original message created by the bot gets deleted, you might need to flush the bot data to reinitialize the message.  \n_The bot has no cleanup functionality, leftover messages must be removed manually._\n\n#### Flush telegram data\nIf the original message created by the bot gets deleted, you need to flush the bot data to reinitialize the message.  \n_The bot has no cleanup functionality, leftover messages must be removed manually._\n\n#### Flush slack data\nIf the original message created by the bot gets deleted, you need to flush the bot data to reinitialize the message.  \n_The bot has no cleanup functionality, leftover messages must be removed manually._\n\n# Deployment\nCheck the wiki page for detailed instructions on [how to setup a self deploying free cloud instance at fly.io](https://github.com/a-sync/game-server-watcher/wiki/Free-hosting-via-fly.io).  \nThe latest Pterodactyl egg can always be found here: [🥚](https://raw.githubusercontent.com/a-sync/game-server-watcher/master/egg.json)  \nPre-built container images can be downloaded from the github container registry: `docker pull ghcr.io/a-sync/game-server-watcher`  \n\u003cp align=\"center\"\u003e\n  \u003c!--\u003ca href=\"https://app.koyeb.com/deploy?type=git\u0026repository=github.com/a-sync/game-server-watcher\u0026branch=master\u0026name=gsw\"\u003e\u003cimg src=\"https://www.koyeb.com/static/images/deploy/button.svg\" height=\"32\" alt=\"Deploy to Koyeb\"\u003e\u003c/a\u003e//TODO: support ephemeral storage--\u003e\n  \u003c!--\u003ca href=\"https://heroku.com/deploy?template=https%3A%2F%2Fgithub.com%2Fa-sync%2Fgame-server-watcher\"\u003e\u003cimg src=\"https://www.herokucdn.com/deploy/button.svg\" height=\"32\" alt=\"Deploy to Heroku\"\u003e\u003c/a\u003e//TODO: support ephemeral storage--\u003e\n  \u003ca href=\"https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fa-sync%2Fgame-server-watcher%2Fmaster%2Fazuredeploy.json\"\u003e\u003cimg src=\"https://aka.ms/deploytoazurebutton\" height=\"32\" alt=\"Deploy to Azure\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://deploy.cloud.run?git_repo=https%3A%2F%2Fgithub.com%2Fa-sync%2Fgame-server-watcher\"\u003e\u003cimg src=\"https://deploy.cloud.run/button.svg\" height=\"32\" alt=\"Run on Google Cloud\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://cloud.digitalocean.com/apps/new?repo=https%3A%2F%2Fgithub.com%2Fa-sync%2Fgame-server-watcher%2Ftree%2Fmaster\"\u003e\u003cimg src=\"https://www.deploytodo.com/do-btn-blue.svg\" height=\"32\" alt=\"Deploy to DigitalOcean\"\u003e\u003c/a\u003e\n  \u003c!--\u003ca href=\"https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fa-sync%2Fgame-server-watcher\u0026env=SECRET\"\u003e\u003cimg src=\"https://vercel.com/button\" height=\"32\" alt=\"Deploy with Vercel\"\u003e\u003c/a\u003e//TODO: support runnig as serverless function--\u003e\n  \u003c!--\u003ca href=\"https://stackblitz.com/fork/github/a-sync/game-server-watcher\"\u003e\u003cimg src=\"https://developer.stackblitz.com/img/open_in_stackblitz.svg\" height=\"32\" alt=\"Open in StackBlitz\"\u003e\u003c/a\u003e--\u003e\n\u003c/p\u003e\n\n## Hosting via Docker Compose\nMake sure to configure the environment variables in [docker-compose.yml](./docker-compose.yml#L13).  \n```\ndocker-compose up\n```\n\n## Hosting via NodeJS runtime\nMake sure all the [requirements](#requirements) are met!  \n\n### Build artifacts\n```\nnpm i\nnpm run build\n```\n\n### Minimum required files on host\nCopy the `./package.json` file and the `./public/` and `./dist/` folders and their contents to your deployment folder.\n \n### Install production dependencies on host\nNavigate to the deployment folder and execute the following command:\n```\nnpm i --only=prod\n```\n_If you can not install dependencies on the host, do a local install and copy the `./node_modules/` folder to the host._\n\n### Service configuration\nCreate environmental variables to enable the required features and to customize the service.  \n1. Make sure the service can write to the data storage path. (configured by `DATA_PATH` env var, default: `./data/`)  \n2. Make sure you create a unique admin secret. (configured by `SECRET` env var, default: `secret`)\n\n### Running\nRun the program from the deployment folder:\n```\nnode ./dist/server.js\n```\n\n# How to Get Help\n* Check the [wiki](https://github.com/a-sync/game-server-watcher/wiki)\n* Ask a [question](https://github.com/a-sync/game-server-watcher/discussions/new?category=q-a)\n* Join the support / test [discord](https://discord.gg/4tsbftsGJz)\n\n# Further Reading\n* [gamedig supported games list](https://github.com/gamedig/node-gamedig/blob/master/GAMES_LIST.md)\n* [steamDB](https://steamdb.info/apps/)\n* [steam web API documentation](https://steamapi.xpaw.me/#IGameServersService/GetServerList)\n* [discord API v10 documentation](https://discord.js.org/#/docs/discord.js/14.7.1/class/EmbedBuilder)\n* [telegram API documentation](https://core.telegram.org/bots/api#editmessagetext)\n* [slack API documentation](https://api.slack.com/apis)\n    * [block kit reference](https://api.slack.com/reference/block-kit#reference)\n* [json-editor documentation](https://github.com/json-editor/json-editor#json-schema-support)\n    * [json-editor demos](https://pmk65.github.io/jedemov2/dist/demo.html)\n* [bootstrap 4 reference](https://www.w3schools.com/bootstrap4/bootstrap_ref_all_classes.asp)\n* [mustache documentation](https://github.com/janl/mustache.js#templates)\n* [pterodactyl documentation](https://pterodactyl.io/community/config/eggs/creating_a_custom_egg.html)\n    * [community docu fork](https://quintenqvd0.github.io/pterodactyl-documentation/docs/eggs/egg/)\n\n# Contributing\nPublic contributions are welcome!  \nYou can create a [new issue](https://github.com/a-sync/game-server-watcher/issues/new) for bugs, or feel free to open a [pull request](https://github.com/a-sync/game-server-watcher/pulls) for any and all your changes or work-in-progress features.\n\n# License\nThis project is licensed under the [AGPL License](./LICENSE.md) by default for public use. Businesses or organizations seeking a commercial license, please contact gsw@devs.space.\n\n# Authors\nCheck the list of [contributors](https://github.com/a-sync/game-server-watcher/contributors) who participated in this project.\n\n# Acknowledgments\nThis project was inspired by (the sudden disappearance of) \"_Game Status#5371_\" bot and its creator [Ramzi Saheb](https://github.com/Ramzi-Sah) on discord.  \n\nGSW icon stolen from _Marvel’s Voices: Indigenous Voices #1_ \"_The Watcher_\" by [Jeffrey Veregge](https://www.jeffreyveregge.com).  \n\nBackgrounds stolen from [purple nebulas](https://opengameart.org/content/seamless-space-backgrounds) by [Screaming Brain Studios](https://screamingbrainstudios.com) and [imgur](https://imgur.com).  \n\nAll other libraries and dependencies are listed in the _package.json file (dependencies/devDependencies section)_ and the _index.html file (head section)_.  \n\n## Similar projects\n* https://github.com/soulkobk/DiscordBot_GameStatus\n* https://github.com/Douile/discord-gamestatus\n* https://github.com/Ramzi-Sah/game-status-discordbot\n* https://github.com/Ramzi-Sah/game-status-discordbot-selfhosted  \n* https://github.com/msniveau/discord-statusbot\n* https://github.com/kevinkjt2000/bowser\n* https://github.com/negrifelipe/ServerStatusBot\n* https://gitlab.com/lxndr/gswatcher\n* https://github.com/Unity-Technologies/qstat\n* https://github.com/GiyoMoon/steam-server-query\n* https://github.com/Fabricio-191/valve-server-query\n* https://github.com/sbuggay/srcds-info-proxy\n* https://github.com/DiscordGSM/DiscordGSM\n* https://github.com/EndBug/game-tracker\n* https://github.com/fasko-web/discord-gameserver-bots\n* https://github.com/FlorianSW/discord-player-count-bot\n* https://github.com/Destarianon/FawxGameDigBot\n* https://github.com/patriksh/gameserver-bot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-sync%2Fgame-server-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-sync%2Fgame-server-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-sync%2Fgame-server-watcher/lists"}