Watch screen for w3c match started.
- Python 100%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| w3cwatcher | ||
| .gitignore | ||
| claude.md | ||
| pyproject.toml | ||
| README.md | ||
| run.py | ||
| run_tray.pyw | ||
| w3cwatcher.spec | ||
W3C Watcher
W3C Watcher is a lightweight background pixel-monitoring utility for Windows and Linux.
It checks for the color of the W3Champions match button and sends a Discord, Telegram, or custom webhook notification when it detects a match has been found.
Supports Windows and Linux (KDE/Wayland via Wine/XWayland).
Installation
pip install git+https://github.com/Cubiss/w3cwatcher.git
Usage
GUI / Tray Mode
Run normally to start the tray watcher:
w3cwatcher --tray
Monitoring starts automatically when the tray app launches. Right-click the tray icon to configure:
- Start - starts monitoring
- Stop - stops monitoring
- Tools/Check capture area - opens image showing what W3CWatcher sees
- Tools/Test game start - simulates state transitions (for testing notifications)
- Tools/Log - opens the log file
- Tools/Settings - opens the config file
Icon color:
- Green - Waiting (ready to queue)
- Red - In Queue
- Blue - In Game
- Grey - Disabled
CLI flags
| Flag | Description |
|---|---|
--tray |
Run as system tray app |
--check |
Show debug image of the currently watched area |
--settings |
Open the config file (creates it with defaults if missing) |
--config <path> |
Use a specific config file |
--x <float> |
Override horizontal pixel offset (0.0–1.0, default 0.755) |
--y <float> |
Override vertical pixel offset (0.0–1.0, default 0.955) |
--poll <int> |
Override polling interval in seconds (default 1) |
Setup a Discord webhook
- Open Discord
- Go to the server and select the channel
- Click the channel name → Integrations
- (Alternate) Right‑click channel → Edit Channel → Integrations
- Click Webhooks
- Click New Webhook
- Name it and pick the channel
- Click Copy Webhook URL. This is your
webhook_url. - Run
w3cwatcher --settingsor clickTools/Settingsin Tray context menu to open the config file - Add or update the Discord section:
[notifications.discord]
enabled = true
webhook_url = "https://discord.com/api/webhooks/.../..."
Setup a generic webhook
The generic webhook notifier sends an HTTP request to any URL when a game event occurs.
- Run
w3cwatcher --settingsor clickTools/Settingsin Tray context menu to open the config file - Add or update the webhook section:
[notifications.webhook]
enabled = true
url = "https://example.com/my-webhook"
on_events = ["in-game"] # events that trigger the webhook
payload = '{"event": "{state}", "duration": "{duration}"}'
method = "POST"
debounce = 0
on_events controls which game events fire the webhook. Valid values:
in-game— match found (game started)waiting— back to waiting (game ended or left queue)in-queue— entered queuedisabled— monitor stopped
payload is a string template sent as the request body. Two placeholders are available:
{state}— the event name (e.g.in-game){duration}— time spent in the previous state, formatted asHH:MM:SS
Setup a Telegram Bot
- Open Telegram
- Search for
@BotFatherand start a chat - Create a new bot by sending:
/newbot - Choose a name and a username (the username must end with
bot, e.g.w3cwatcher_notifier_bot) - BotFather will reply with your Bot Token (
123456789:ABCdefGhIjkLmNoPQRstuVWxyZ, yourbot_token) and a link to the bot (open it and tap start). - In Telegram, search for
@userinfobot - Start it, and it will immediately display your Telegram user ID. This is your
chat_id - Run
w3cwatcher --settingsor clickTools/Settingsin Tray context menu to open the config file - Add or update the Telegram section:
[notifications.telegram]
enabled = true
bot_token = "123456789:ABCdefGhIjkLmNoPQRstuVWxyZ"
chat_id = "123456789"