# lunarcrafter94/bloxassist-discord-bot architecture

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

- Interactive diagram: https://gitdiagram.com/lunarcrafter94/bloxassist-discord-bot
- Repository: https://github.com/lunarcrafter94/bloxassist-discord-bot

## Overview

BloxAssist is a multi-server Discord bot for Blox Fruits service tickets, helper coordination, credit and debt management, invite rewards, administration, and reporting. Members interact through slash commands and persistent Discord panels; handlers resolve server-scoped storage and carry out the requested workflows. The graph includes ticket lifecycle and transcripts, credit operations, configuration and staff reporting, invite attribution, and optional backups. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled feature internals are represented by their documented subsystem.

Main entry points: [`source-files/bloxassist_discord_bot/bot_client.py`](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py) (Commands and events), [`source-files/bloxassist_discord_bot/tickets/ticket_views.py`](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/tickets/ticket_views.py) (Ticket lifecycle UI), [`source-files/bloxassist_discord_bot/database/database_manager.py`](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/database/database_manager.py) (Server database resolver), [`source-files/bloxassist_discord_bot/audit.py`](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/audit.py) (Audit delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_entry["Runtime entry<br/>[__main__.py]"]
  node_bot["Commands and events<br/>[bot_client.py]"]
  node_interactions["Private responses"]
  node_pagination["Pagination controls<br/>[pagination.py]"]
end

subgraph group_tickets["Ticket workflows"]
  node_ticket_ui["Ticket lifecycle UI<br/>[ticket_views.py]"]
  node_ticket_numbers["Ticket identifiers<br/>[ticket_numbers.py]"]
  node_ticket_messages["Ticket messages<br/>[ticket_messages.py]"]
end

subgraph group_credits["Credits and invites"]
  node_credit_commands["Credit commands<br/>[bot_client.py]"]
  node_credit_service["Credit lookup service<br/>[credit_service.py]"]
  node_credit_history["Credit history UI"]
  node_invite_rewards["Invite attribution<br/>[invite_events.py]"]
end

subgraph group_admin["Administration and reporting"]
  node_dashboard["Admin dashboard<br/>[dashboard_views.py]"]
  node_reports["Reports and analytics<br/>[bot_client.py]"]
  node_audit["Audit delivery<br/>[audit.py]"]
end

subgraph group_storage["Persistence and operations"]
  node_settings["Runtime settings<br/>[settings.py]"]
  node_db_manager["Server database resolver"]
  node_guild_db[("Server data store<br/>[guild_database.py]")]
  node_backups["Encrypted backups<br/>[backups.py]"]
end

node_members(("Discord members"))
node_discord(("Discord platform"))

node_members -->|"use bot"| node_discord
node_discord -->|"dispatches interactions"| node_bot
node_entry -->|"starts"| node_bot
node_entry -->|"loads"| node_settings
node_bot -->|"routes ticket actions"| node_ticket_ui
node_bot -->|"opens dashboard"| node_dashboard
node_bot -->|"handles credit commands"| node_credit_commands
node_bot -->|"uses lookup service"| node_credit_service
node_bot -->|"opens history"| node_credit_history
node_bot -->|"attributes invites"| node_invite_rewards
node_bot -->|"serves reports"| node_reports
node_ticket_ui -->|"allocates identifiers"| node_ticket_numbers
node_ticket_ui -->|"renders welcome text"| node_ticket_messages
node_ticket_ui -->|"reads and updates tickets"| node_guild_db
node_ticket_ui -->|"logs transactions"| node_audit
node_credit_service -->|"resolves server store"| node_db_manager
node_credit_history -->|"uses controls"| node_pagination
node_bot -->|"resolves server data"| node_db_manager
node_dashboard -->|"loads and saves settings"| node_db_manager
node_dashboard -->|"records admin actions"| node_audit
node_reports -->|"paginates results"| node_pagination
node_reports -->|"queries server records"| node_db_manager
node_audit -->|"reads audit setting"| node_guild_db
node_audit -->|"sends audit messages"| node_discord
node_db_manager -->|"creates and caches"| node_guild_db
node_backups -.->|"sends server archives"| node_discord
node_bot -->|"schedules backups"| node_backups
node_bot -->|"sends private responses"| node_interactions

click node_entry "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/__main__.py"
click node_bot "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py"
click node_interactions "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/interaction_utils.py"
click node_pagination "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/pagination.py"
click node_ticket_ui "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/tickets/ticket_views.py"
click node_ticket_numbers "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/ticket_numbers.py"
click node_ticket_messages "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/ticket_messages.py"
click node_credit_commands "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py"
click node_credit_service "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/credits/credit_service.py"
click node_credit_history "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/credits/credit_history_view.py"
click node_invite_rewards "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/invites/invite_events.py"
click node_dashboard "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/admin/dashboard_views.py"
click node_reports "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py"
click node_audit "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/audit.py"
click node_settings "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/settings.py"
click node_db_manager "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/database/database_manager.py"
click node_guild_db "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/database/guild_database.py"
click node_backups "https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/backups.py"

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,node_bot,node_interactions,node_pagination toneBlue
class node_ticket_ui,node_ticket_numbers,node_ticket_messages toneAmber
class node_credit_commands,node_credit_service,node_credit_history,node_invite_rewards toneMint
class node_dashboard,node_reports,node_audit toneRose
class node_settings,node_db_manager,node_guild_db,node_backups,node_members,node_discord toneIndigo
```

## Components

### Bot runtime

- [Runtime entry](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/__main__.py): `source-files/bloxassist_discord_bot/__main__.py`
- [Commands and events](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py): `source-files/bloxassist_discord_bot/bot_client.py`
- [Private responses](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/interaction_utils.py): `source-files/bloxassist_discord_bot/interaction_utils.py`
- [Pagination controls](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/pagination.py): `source-files/bloxassist_discord_bot/pagination.py`

### Ticket workflows

- [Ticket lifecycle UI](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/tickets/ticket_views.py): `source-files/bloxassist_discord_bot/tickets/ticket_views.py`
- [Ticket identifiers](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/ticket_numbers.py): `source-files/bloxassist_discord_bot/ticket_numbers.py`
- [Ticket messages](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/ticket_messages.py): `source-files/bloxassist_discord_bot/ticket_messages.py`

### Credits and invites

- [Credit commands](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py): `source-files/bloxassist_discord_bot/bot_client.py`
- [Credit lookup service](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/credits/credit_service.py): `source-files/bloxassist_discord_bot/credits/credit_service.py`
- [Credit history UI](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/credits/credit_history_view.py): `source-files/bloxassist_discord_bot/credits/credit_history_view.py`
- [Invite attribution](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/invites/invite_events.py): `source-files/bloxassist_discord_bot/invites/invite_events.py`

### Administration and reporting

- [Admin dashboard](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/admin/dashboard_views.py): `source-files/bloxassist_discord_bot/admin/dashboard_views.py`
- [Reports and analytics](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/bot_client.py): `source-files/bloxassist_discord_bot/bot_client.py`
- [Audit delivery](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/audit.py): `source-files/bloxassist_discord_bot/audit.py`

### Persistence and operations

- [Runtime settings](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/settings.py): `source-files/bloxassist_discord_bot/settings.py`
- [Server database resolver](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/database/database_manager.py): `source-files/bloxassist_discord_bot/database/database_manager.py`
- [Server data store](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/database/guild_database.py): `source-files/bloxassist_discord_bot/database/guild_database.py`
- [Encrypted backups](https://github.com/lunarcrafter94/bloxassist-discord-bot/blob/main/source-files/bloxassist_discord_bot/backups.py): `source-files/bloxassist_discord_bot/backups.py`

### Other components

- **Discord members**
- **Discord platform**

## Connections

- Discord members → Discord platform: use bot (evidence: `README.md`)
- Discord platform → Commands and events: dispatches interactions (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Runtime entry → Commands and events: starts (evidence: `source-files/bloxassist_discord_bot/__main__.py`)
- Runtime entry → Runtime settings: loads (evidence: `source-files/bloxassist_discord_bot/__main__.py`)
- Commands and events → Ticket lifecycle UI: routes ticket actions (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Admin dashboard: opens dashboard (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Credit commands: handles credit commands (evidence: `README.md`)
- Commands and events → Credit lookup service: uses lookup service (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Credit history UI: opens history (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Invite attribution: attributes invites (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Reports and analytics: serves reports (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Ticket lifecycle UI → Ticket identifiers: allocates identifiers (evidence: `source-files/bloxassist_discord_bot/tickets/ticket_views.py`)
- Ticket lifecycle UI → Ticket messages: renders welcome text (evidence: `source-files/bloxassist_discord_bot/tickets/ticket_views.py`)
- Ticket lifecycle UI → Server data store: reads and updates tickets (evidence: `source-files/bloxassist_discord_bot/tickets/ticket_views.py`)
- Ticket lifecycle UI → Audit delivery: logs transactions (evidence: `source-files/bloxassist_discord_bot/tickets/ticket_views.py`)
- Credit lookup service → Server database resolver: resolves server store (evidence: `source-files/bloxassist_discord_bot/credits/credit_service.py`)
- Credit history UI → Pagination controls: uses controls (evidence: `source-files/bloxassist_discord_bot/credits/credit_history_view.py`)
- Commands and events → Server database resolver: resolves server data (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Admin dashboard → Server database resolver: loads and saves settings (evidence: `source-files/bloxassist_discord_bot/admin/dashboard_views.py`)
- Admin dashboard → Audit delivery: records admin actions (evidence: `source-files/bloxassist_discord_bot/admin/dashboard_views.py`)
- Reports and analytics → Pagination controls: paginates results (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Reports and analytics → Server database resolver: queries server records (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Audit delivery → Server data store: reads audit setting (evidence: `source-files/bloxassist_discord_bot/audit.py`)
- Audit delivery → Discord platform: sends audit messages (evidence: `source-files/bloxassist_discord_bot/audit.py`)
- Server database resolver → Server data store: creates and caches (evidence: `source-files/bloxassist_discord_bot/database/database_manager.py`)
- Encrypted backups → Discord platform: sends server archives (evidence: `README.md`)
- Commands and events → Encrypted backups: schedules backups (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
- Commands and events → Private responses: sends private responses (evidence: `source-files/bloxassist_discord_bot/bot_client.py`)
