# samsanai/voicemaster-discord-bot architecture

> Architecture diagram of the GitHub repository samsanai/voicemaster-discord-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/samsanai/voicemaster-discord-bot
- Repository: https://github.com/samsanai/voicemaster-discord-bot

## Overview

VoiceMaster is a Discord bot for configuring and managing temporary voice channels. Server owners configure a join-to-create channel; a voice-state event detects joins, creates and assigns a personal channel, then deletes it after it becomes empty. Users can also manage channel access, limits, names, and ownership. The excerpts show the bot entry point, the voice cog, and SQLite operations; other command behavior is represented only where documented or visible in excerpts.

Main entry points: [`cogs/voice.py`](https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py) (Voice commands), [`voice.db`](https://github.com/samsanai/voicemaster-discord-bot/blob/master/voice.db) (SQLite database), [`voicecreate.py`](https://github.com/samsanai/voicemaster-discord-bot/blob/master/voicecreate.py) (Bot entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_entry["Bot entry point<br/>[voicecreate.py]"]
end

subgraph group_voice["Voice channels"]
  node_cog["Voice commands<br/>[voice.py]"]
  node_setup["Server setup<br/>[voice.py]"]
  node_lifecycle["Temporary channel lifecycle<br/>[voice.py]"]
  node_channel_controls["Channel controls<br/>[voice.py]"]
end

subgraph group_state["Persistent state"]
  node_sqlite[("SQLite database<br/>[voice.db]")]
end

node_member(("Discord member"))
node_discord{{"Discord platform"}}

node_entry -->|"loads extension"| node_cog
node_member -->|"uses bot"| node_discord
node_discord -.->|"dispatches events"| node_entry
node_discord -.->|"delivers voice events"| node_cog
node_member -->|"configures server"| node_setup
node_setup -->|"creates channels"| node_discord
node_setup -->|"stores setup"| node_sqlite
node_cog -->|"handles voice state"| node_lifecycle
node_lifecycle -->|"reads and writes"| node_sqlite
node_lifecycle -->|"creates and deletes"| node_discord
node_member -->|"runs commands"| node_channel_controls
node_channel_controls -->|"looks up channels"| node_sqlite
node_channel_controls -->|"edits permissions"| node_discord
node_cog -->|"provides help"| node_channel_controls

click node_entry "https://github.com/samsanai/voicemaster-discord-bot/blob/master/voicecreate.py"
click node_cog "https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py"
click node_setup "https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py"
click node_lifecycle "https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py"
click node_channel_controls "https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py"
click node_sqlite "https://github.com/samsanai/voicemaster-discord-bot/blob/master/voice.db"

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_entry toneBlue
class node_cog,node_setup,node_lifecycle,node_channel_controls toneAmber
class node_sqlite toneMint
class node_member,node_discord toneIndigo
```

## Components

### Bot runtime

- [Bot entry point](https://github.com/samsanai/voicemaster-discord-bot/blob/master/voicecreate.py): `voicecreate.py`

### Voice channels

- [Voice commands](https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py): `cogs/voice.py`
- [Server setup](https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py): `cogs/voice.py`
- [Temporary channel lifecycle](https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py): `cogs/voice.py`
- [Channel controls](https://github.com/samsanai/voicemaster-discord-bot/blob/master/cogs/voice.py): `cogs/voice.py`

### Persistent state

- [SQLite database](https://github.com/samsanai/voicemaster-discord-bot/blob/master/voice.db): `voice.db`

### Other components

- **Discord member**
- **Discord platform**

## Connections

- Bot entry point → Voice commands: loads extension (evidence: `voicecreate.py`)
- Discord member → Discord platform: uses bot (evidence: `README.md`)
- Discord platform → Bot entry point: dispatches events
- Discord platform → Voice commands: delivers voice events
- Discord member → Server setup: configures server (evidence: `cogs/voice.py`)
- Server setup → Discord platform: creates channels (evidence: `cogs/voice.py`)
- Server setup → SQLite database: stores setup (evidence: `cogs/voice.py`)
- Voice commands → Temporary channel lifecycle: handles voice state (evidence: `cogs/voice.py`)
- Temporary channel lifecycle → SQLite database: reads and writes (evidence: `cogs/voice.py`)
- Temporary channel lifecycle → Discord platform: creates and deletes (evidence: `cogs/voice.py`)
- Discord member → Channel controls: runs commands (evidence: `cogs/voice.py`)
- Channel controls → SQLite database: looks up channels (evidence: `cogs/voice.py`)
- Channel controls → Discord platform: edits permissions (evidence: `cogs/voice.py`)
- Voice commands → Channel controls: provides help (evidence: `cogs/voice.py`)
