# valorant-draft-circuit/vdc-bot architecture

> Architecture diagram of the GitHub repository valorant-draft-circuit/vdc-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/valorant-draft-circuit/vdc-bot
- Repository: https://github.com/valorant-draft-circuit/vdc-bot

## Overview

This is the Valorant Draft Circuit Discord bot. Players and staff interact through Discord commands, buttons, and events; the repository tree shows broad league operations including queues and match handling, drafts, roster transactions, moderation, and profiles. Queue workers and scheduled expiry workers provide background behavior. The README is only a placeholder, and most implementation files were not sampled, so subsystem relationships beyond the map-veto excerpt are shown as unverified rather than asserted.

Main entry points: [`src/interactions/commands`](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/commands) (Slash commands), [`src/interactions/buttons/mapbansManager.js`](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/interactions/buttons/mapbansManager.js) (Map veto), [`src/core/queue`](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/core/queue) (Queue management), [`src/events`](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/events) (Discord events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Discord interaction"]
  node_commands["Slash commands"]
  node_buttons["Button handlers"]
  node_events["Discord events"]
end

subgraph group_competition["Competition operations"]
  node_queue["Queue management"]
  node_matchmaker["Matchmaker"]
  node_matchlifecycle["Match lifecycle<br/>[matchLifecycle.js]"]
  node_mapveto["Map veto<br/>[mapbansManager.js]"]
end

subgraph group_administration["League administration"]
  node_draft["Draft operations"]
  node_transactions["Roster transactions"]
  node_league["League management"]
  node_moderation["Moderation"]
  node_profiles["Player profiles<br/>[profile.js]"]
end

subgraph group_runtime["Runtime services"]
  node_enumconfig["Guild configuration<br/>[channels.ts]"]
  node_redis["Redis service<br/>[redis.js]"]
  node_cache["Application cache<br/>[cache.js]"]
  node_modexpiry["Moderation expiry"]
  node_subexpiry["Sub expiry"]
  node_telemetry["Metrics and telemetry<br/>[index.js]"]
end

node_users(("Players and staff"))
node_database[("Prisma database")]
node_discord(("Discord platform"))
node_gameapi["Game data API"]

node_users -.->|"use"| node_discord
node_discord -.->|"delivers commands"| node_commands
node_discord -.->|"delivers clicks"| node_buttons
node_discord -.->|"delivers events"| node_events
node_commands -.->|"manage queue"| node_queue
node_queue -.->|"match players"| node_matchmaker
node_matchmaker -.->|"coordinate matches"| node_matchlifecycle
node_commands -.->|"manage map veto"| node_mapveto
node_mapveto -->|"query match data"| node_database
node_mapveto -->|"fetch map data"| node_gameapi
node_mapveto -->|"send veto updates"| node_discord
node_commands -.->|"manage drafts"| node_draft
node_commands -.->|"manage roster"| node_transactions
node_commands -.->|"manage league"| node_league
node_commands -.->|"moderate members"| node_moderation
node_commands -.->|"view profiles"| node_profiles
node_events -.->|"handle voice changes"| node_queue
node_modexpiry -.->|"reconcile sanctions"| node_database
node_subexpiry -.->|"reconcile subscriptions"| node_database
node_telemetry -.->|"observe runtime"| node_redis
node_enumconfig -.->|"configure guild"| node_discord

click node_commands "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/commands"
click node_buttons "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/buttons"
click node_events "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/events"
click node_queue "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/core/queue"
click node_matchmaker "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/matchmaker"
click node_matchlifecycle "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/core/queue/matchLifecycle.js"
click node_mapveto "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/interactions/buttons/mapbansManager.js"
click node_draft "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/draft"
click node_transactions "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/transactions"
click node_league "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/league"
click node_moderation "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/mod"
click node_profiles "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/interactions/commands/profile.js"
click node_enumconfig "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/utils/enums/channels.ts"
click node_redis "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/core/redis.js"
click node_cache "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/cache/cache.js"
click node_modexpiry "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/modExpiry"
click node_subexpiry "https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/subExpiry"
click node_telemetry "https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/workers/metrics/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_commands,node_buttons,node_events toneBlue
class node_queue,node_matchmaker,node_matchlifecycle,node_mapveto,node_database toneAmber
class node_draft,node_transactions,node_league,node_moderation,node_profiles,node_gameapi toneMint
class node_enumconfig,node_redis,node_cache,node_modexpiry,node_subexpiry,node_telemetry toneRose
class node_users,node_discord toneIndigo
```

## Components

### Discord interaction

- [Slash commands](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/commands): `src/interactions/commands`
- [Button handlers](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/buttons): `src/interactions/buttons`
- [Discord events](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/events): `src/events`

### Competition operations

- [Queue management](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/core/queue): `src/core/queue`
- [Matchmaker](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/matchmaker): `src/workers/matchmaker`
- [Match lifecycle](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/core/queue/matchLifecycle.js): `src/core/queue/matchLifecycle.js`
- [Map veto](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/interactions/buttons/mapbansManager.js): `src/interactions/buttons/mapbansManager.js`

### League administration

- [Draft operations](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/draft): `src/interactions/subcommands/draft`
- [Roster transactions](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/transactions): `src/interactions/subcommands/transactions`
- [League management](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/league): `src/interactions/subcommands/league`
- [Moderation](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/interactions/subcommands/mod): `src/interactions/subcommands/mod`
- [Player profiles](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/interactions/commands/profile.js): `src/interactions/commands/profile.js`

### Runtime services

- [Guild configuration](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/utils/enums/channels.ts): `utils/enums/channels.ts`
- [Redis service](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/core/redis.js): `src/core/redis.js`
- [Application cache](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/cache/cache.js): `cache/cache.js`
- [Moderation expiry](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/modExpiry): `src/workers/modExpiry`
- [Sub expiry](https://github.com/valorant-draft-circuit/vdc-bot/tree/main/src/workers/subExpiry): `src/workers/subExpiry`
- [Metrics and telemetry](https://github.com/valorant-draft-circuit/vdc-bot/blob/main/src/workers/metrics/index.js): `src/workers/metrics/index.js`

### Other components

- **Players and staff**
- **Prisma database**
- **Discord platform**
- **Game data API**

## Connections

- Players and staff → Discord platform: use
- Discord platform → Slash commands: delivers commands
- Discord platform → Button handlers: delivers clicks
- Discord platform → Discord events: delivers events
- Slash commands → Queue management: manage queue
- Queue management → Matchmaker: match players
- Matchmaker → Match lifecycle: coordinate matches
- Slash commands → Map veto: manage map veto
- Map veto → Prisma database: query match data (evidence: `src/interactions/buttons/mapbansManager.js`)
- Map veto → Game data API: fetch map data (evidence: `src/interactions/buttons/mapbansManager.js`)
- Map veto → Discord platform: send veto updates (evidence: `src/interactions/buttons/mapbansManager.js`)
- Slash commands → Draft operations: manage drafts
- Slash commands → Roster transactions: manage roster
- Slash commands → League management: manage league
- Slash commands → Moderation: moderate members
- Slash commands → Player profiles: view profiles
- Discord events → Queue management: handle voice changes
- Moderation expiry → Prisma database: reconcile sanctions
- Sub expiry → Prisma database: reconcile subscriptions
- Metrics and telemetry → Redis service: observe runtime
- Guild configuration → Discord platform: configure guild
