Skip to content

StickKB/Valorant-Discord-Monitor

Repository files navigation

Valorant Discord Monitor

Watches specific Valorant friends and posts Discord webhook updates as their Valorant status changes.

Important: this uses Riot's unofficial local client API. It only works on the same Windows machine where the Riot Client is running, and it can only see players on your friends list.


How It Works

The Riot Client exposes a local HTTP API while it is running. This script polls that API, checks the configured friends, and updates Discord through a webhook.

For status lifecycles, Discord is kept tidy:

  • Online/lobby, queue, match found, agent select, in-match, and score changes edit one live webhook message.
  • Dequeueing back to lobby edits that same message instead of starting a new one.
  • When a normal match ends, that same message is edited into the final score, Win/Loss result, current RR, and RR change when ranked data is available.
  • Deathmatch, Team Deathmatch, and Range do not count as game-ending result messages; returning to lobby from those modes edits the same live status message.
  • The next status after a game result or offline event creates a fresh live message.
  • Offline notices are still preserved. If someone goes offline during an active lifecycle, the live message is edited to Went Offline; otherwise a standalone offline message is sent.
  • Discord embeds use the Valorant monitor icon and show a rank thumbnail when Valorant rank data is available.

Tracked states include lobby, queue, match found, custom setup, agent select, in-match, deathmatch, team deathmatch, range, and offline.


Setup

1. Prerequisites

  • Windows PC with the Riot Client installed
  • Python 3.10+

Install dependencies:

pip install -r requirements.txt

2. Create a Discord Webhook

  1. Open Discord and go to the target channel.
  2. Open Edit Channel > Integrations > Webhooks > New Webhook.
  3. Copy the webhook URL.

3. Configure the script

Copy the example config and edit your local copy:

copy config.example.json config.json

Edit config.json:

{
  "discord_webhook_url": "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN",
  "watched_players": [
    "YourFriend#TAG",
    "AnotherFriend#0001"
  ],
  "notify_on_states": [
    "MENUS",
    "QUEUING",
    "GAME_FOUND",
    "PREGAME",
    "INGAME",
    "DEATHMATCH",
    "TEAM_DM",
    "RANGE",
    "OFFLINE"
  ],
  "check_interval_seconds": 20,
  "auto_start_riot_client": true,
  "riot_client_path": "C:\\Riot Games\\Riot Client\\RiotClientServices.exe",
  "discord_state_file": "discord_state.json"
}

notify_on_states controls which transitions can create a new Discord message. Once a live message exists, the monitor keeps editing it through lobby, queue, match, score, and dequeue updates until a final result or offline event closes that message.

discord_state_file stores active webhook message IDs so the script can keep editing the same live message after a restart.

config.json and discord_state.json are intentionally ignored by git because they contain a Discord webhook token and local runtime state.

4. Run

python monitor.py

If auto_start_riot_client is true and the Riot Client lockfile is missing, the monitor will try to launch Riot Client from riot_client_path. It does not store Riot credentials or perform programmatic sign-in; it relies on Riot Client's normal remembered session. If Riot requires sign-in, you still need to complete that in the Riot Client.


Running in the Background

Option A: leave a terminal open.

Option B: run as a scheduled task on startup:

  1. Open Task Scheduler > Create Basic Task.
  2. Trigger: At log on.
  3. Action: Start a program.
  4. Program: pythonw.exe.
  5. Argument: C:\path\to\monitor.py.

Option C: run via a .bat file:

@echo off
pythonw "C:\path\to\valorant-monitor\monitor.py"

Troubleshooting

Problem Fix
lockfile not found Start/sign in to Riot Client, or enable auto_start_riot_client.
Can't reach local API Riot Client is still starting up; wait a moment.
Player never shows up Double-check the Riot ID exactly, including #TAG.
No Discord messages Verify the webhook URL and channel still exist.
Discord live message is not edited Delete discord_state.json to force the next lifecycle to create a fresh message.
RR is missing RR uses Riot Client's private local-client auth flow and may be unavailable for friends or hidden profiles.

Development Checks

Install development tooling:

pip install -r requirements-dev.txt

Run the same checks used before publishing:

python -m unittest -v
ruff check .
bandit -r . -x .\.venv,.\__pycache__
pip-audit -r requirements.txt

Notes

  • This script runs locally and only sees friends already added in Valorant.
  • It does not store Riot account credentials.
  • It sends data only to the configured Discord webhook.
  • Riot's official VALORANT APIs expose content, match history, ranked leaderboards, and status, but not a general current-RR endpoint for arbitrary friends. This monitor treats RR as best-effort data from the local client.
  • Do not commit config.json; rotate the Discord webhook if it is ever exposed.
  • Riot does not officially support this local API, so future client updates can require monitor changes.

License

MIT License. See LICENSE.

About

Watches specific Valorant friends and posts Discord webhook updates as their Valorant status changes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages