Discord Bot Integration

Control and monitor your game servers directly from Discord. The WGS bot supports server management commands, real-time notifications, and role-based access.

⚙️ Setup

  1. Go to discord.com/developers and create a new application & bot.
  2. In the bot settings, enable Message Content Intent.
  3. Invite the bot to your server with Read Messages and Send Messages permissions.
  4. In WGS, go to Settings → Discord Remote Control Bot.
  5. Enable the bot and paste your Bot Token and the Control Channel ID.
  6. Optionally set a custom command prefix (default: !) and allowed Discord user IDs.
  7. Click Save — the bot connects immediately.
Tip: Leave the allowed user IDs field empty to allow all server members to use commands, or enter comma-separated Discord user IDs to restrict access to specific people.

📋 Available Commands

All commands target the server by its name or a partial match. If multiple servers match, the bot replies asking you to be more specific.

CommandDescription
!start <server>Start the specified server.
!stop <server>Gracefully stop the server.
!restart <server>Stop and immediately restart the server.
!update <server>Run a SteamCMD update for the server.
!backup <server>Trigger an immediate world backup.
!cmd <server> <command>Send a console command directly to the running server. Example: !cmd MyServer say Hello
!statusList all servers and their current state (running / stopped).
!helpShow available commands in the channel.

🔔 Notifications

WGS can post automatic notifications to your Discord channel for the following events. Each can be toggled independently in Settings → Discord Notifications:

Notifications are sent via a Discord Webhook URL (separate from the bot). Set a global webhook in Settings → Discord Notifications → Webhook URL.

Since v1.2.3, each server can also have its own webhook URL set in its individual Settings → Discord alerts tab — useful for routing different servers to different Discord channels. The per-server URL takes priority; the global URL is used as fallback.

🛡️ Security

Your Bot Token is encrypted with Windows DPAPI before being saved to disk — it is never stored as plain text. The bot uses long-polling to communicate with Discord, so no incoming ports need to be opened. All write-access commands (start, stop, restart, update, backup, cmd) require the user to be in the allowed users list if one is configured.