Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 29, 2025

New cog to monitor Steam game servers via A2S protocol (python-a2s). Displays auto-updating embeds with server status, player count, and a Steam quick-join button.

Commands

  • gameserver add <ip> <port> [password] - Add server to monitor
  • gameserver remove <ip> <port> - Remove server
  • gameserver list - List monitored servers
  • gameserver post <ip> <port> - Post auto-updating embed
  • gameserver status <ip> <port> - Query any server
  • gameserver refresh - Force refresh all servers

Implementation

  • Background task polls servers every 2 minutes via a2s.ainfo()
  • Embeds show: name, game, players, address, password (spoiler)
  • Link button uses steam://connect/<ip>:<port>/[password] protocol
  • Admin/manage_guild permission required for add/remove/post/refresh

Embed example

┌─────────────────────────────────────┐
│ My Game Server                      │
├─────────────────────────────────────┤
│ Status: 🟢 Online    Game: CS2      │
│ Players: 24/32                      │
│ Address: `1.2.3.4:27015`            │
├─────────────────────────────────────┤
│ [🎮 Join Server]                    │
└─────────────────────────────────────┘

Dependencies

  • python-a2s>=1.3.0
Original prompt

create a new cog "game_embed"

This cog should monitor a specified game servers. This will only support steam servers that are supported by the python-a2s module (https://github.com/Yepoleb/python-a2s).

The cog should regularly check if the server is online, storing the server name, number of players and the game.

admins or moderators of the discord can then specify to post an embed (that is edited with the latest information) that represents that server. Showing the Server name, the game, the number of players online, and the server ip and port (and any password that might be provided).

Additionally the embed should have a button attached that redirects the user to the steam protocol for immediately joining the game. "steam://connect/:/[password]"


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 29, 2025
Copilot AI and others added 2 commits November 29, 2025 23:25
Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add game embed cog for monitoring game servers Nov 29, 2025
Copilot AI requested a review from psykzz November 29, 2025 23:30
Copilot finished work on behalf of psykzz November 29, 2025 23:30
@psykzz
Copy link
Owner

psykzz commented Nov 29, 2025

@copilot remove the map "Map: de_dust2" - its not always available

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 29, 2025

@copilot remove the map "Map: de_dust2" - its not always available

Removed the Map field from the server embed in commit a9b9703. The embed now shows: Status, Game, Players, Address, and Password (if provided).

Copilot finished work on behalf of psykzz November 29, 2025 23:34
@psykzz psykzz marked this pull request as ready for review November 29, 2025 23:35
@psykzz psykzz merged commit e9243af into main Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants