# pbew/bot-pando architecture

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

- Interactive diagram: https://gitdiagram.com/pbew/bot-pando
- Repository: https://github.com/pbew/bot-pando

## Overview

Pandora’s Night Heaven is a Discord shop-management bot. Its main workflow runs from reception creating a service bill, through staff acceptance and customer slip submission, to payment review, scheduled job updates, and a review invitation. Separate panels support attendance, donations, tickets, administration, and optional VIP. The excerpts and source index establish several module dependencies; other cross-system links below are included only where the README documents the capability. Some subsystem implementations were not sampled.

Main entry points: [`cogs/payments.py`](https://github.com/pbew/bot-pando/blob/main/cogs/payments.py) (Slip payments), [`cogs/reception.py`](https://github.com/pbew/bot-pando/blob/main/cogs/reception.py) (Reception bills), [`bot.py`](https://github.com/pbew/bot-pando/blob/main/bot.py) (Bot runtime), [`cogs/attendance.py`](https://github.com/pbew/bot-pando/blob/main/cogs/attendance.py) (Attendance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop_ops["Shop operations"]
  node_reception["Reception bills<br/>[reception.py]"]
  node_pricing["Pricing rules<br/>[pricing.py]"]
  node_payments["Slip payments<br/>[payments.py]"]
  node_scheduler["Job scheduler<br/>[scheduler.py]"]
  node_reviews["Reviews<br/>[reviews.py]"]
end

subgraph group_staff_customer["Staff and customers"]
  node_request_panel["Request panel<br/>[requestpanel.py]"]
  node_donations["Donations<br/>[donate.py]"]
  node_tickets["DM tickets<br/>[tickets.py]"]
  node_dm_router["DM router<br/>[dmrouter.py]"]
  node_attendance["Attendance<br/>[attendance.py]"]
  node_staff_panel["Staff panel<br/>[staffpanel.py]"]
end

subgraph group_admin_insights["Administration"]
  node_admin_panel["Admin panel<br/>[adminpanel.py]"]
  node_admin_commands["Admin commands<br/>[admin.py]"]
  node_daily_check["Daily check-in<br/>[dailycheck.py]"]
  node_vip["VIP service<br/>[vip.py]"]
  node_vip_logic["VIP lifecycle<br/>[vip_logic.py]"]
end

subgraph group_runtime_data["Runtime and data"]
  node_bot_runtime["Bot runtime<br/>[bot.py]"]
  node_configuration["Configuration<br/>[config.py]"]
  node_database[("SQLite data<br/>[database.py]")]
  node_sheets["Google Sheets<br/>[sheets.py]"]
  node_cycle["Cycle calculations<br/>[cycle.py]"]
  node_embeds["Discord embeds<br/>[embeds.py]"]
end

node_admin_actor(("Admin"))
node_customer_actor(("Customer"))
node_staff_actor(("Staff"))

node_admin_actor -->|"opens bills"| node_reception
node_reception -->|"quotes services"| node_pricing
node_reception -->|"checks availability"| node_attendance
node_reception -.->|"requests payment"| node_payments
node_customer_actor -->|"submits slip"| node_payments
node_admin_actor -->|"confirms slip"| node_payments
node_payments -.->|"updates job"| node_scheduler
node_scheduler -.->|"invites review"| node_reviews
node_customer_actor -->|"browses services"| node_request_panel
node_request_panel -.->|"starts donation"| node_donations
node_customer_actor -->|"asks questions"| node_tickets
node_staff_actor -->|"clocks in"| node_attendance
node_staff_actor -->|"checks work"| node_staff_panel
node_admin_actor -->|"manages shop"| node_admin_panel
node_admin_actor -->|"runs commands"| node_admin_commands
node_staff_actor -.->|"checks in"| node_daily_check
node_vip -->|"uses lifecycle"| node_vip_logic
node_bot_runtime -->|"loads config"| node_configuration
node_bot_runtime -->|"connects database"| node_database
node_bot_runtime -->|"starts sheets"| node_sheets
node_attendance -->|"uses cycle"| node_cycle
node_reception -->|"uses embeds"| node_embeds
node_payments -->|"uses pricing"| node_pricing
node_payments -->|"uses cycle"| node_cycle
node_reviews -->|"uses embeds"| node_embeds
node_admin_panel -->|"uses embeds"| node_embeds

click node_reception "https://github.com/pbew/bot-pando/blob/main/cogs/reception.py"
click node_pricing "https://github.com/pbew/bot-pando/blob/main/core/pricing.py"
click node_payments "https://github.com/pbew/bot-pando/blob/main/cogs/payments.py"
click node_scheduler "https://github.com/pbew/bot-pando/blob/main/cogs/scheduler.py"
click node_reviews "https://github.com/pbew/bot-pando/blob/main/cogs/reviews.py"
click node_request_panel "https://github.com/pbew/bot-pando/blob/main/cogs/requestpanel.py"
click node_donations "https://github.com/pbew/bot-pando/blob/main/cogs/donate.py"
click node_tickets "https://github.com/pbew/bot-pando/blob/main/cogs/tickets.py"
click node_dm_router "https://github.com/pbew/bot-pando/blob/main/cogs/dmrouter.py"
click node_attendance "https://github.com/pbew/bot-pando/blob/main/cogs/attendance.py"
click node_staff_panel "https://github.com/pbew/bot-pando/blob/main/cogs/staffpanel.py"
click node_admin_panel "https://github.com/pbew/bot-pando/blob/main/cogs/adminpanel.py"
click node_admin_commands "https://github.com/pbew/bot-pando/blob/main/cogs/admin.py"
click node_daily_check "https://github.com/pbew/bot-pando/blob/main/cogs/dailycheck.py"
click node_vip "https://github.com/pbew/bot-pando/blob/main/cogs/vip.py"
click node_vip_logic "https://github.com/pbew/bot-pando/blob/main/core/vip_logic.py"
click node_bot_runtime "https://github.com/pbew/bot-pando/blob/main/bot.py"
click node_configuration "https://github.com/pbew/bot-pando/blob/main/core/config.py"
click node_database "https://github.com/pbew/bot-pando/blob/main/core/database.py"
click node_sheets "https://github.com/pbew/bot-pando/blob/main/core/sheets.py"
click node_cycle "https://github.com/pbew/bot-pando/blob/main/core/cycle.py"
click node_embeds "https://github.com/pbew/bot-pando/blob/main/core/embeds.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_reception,node_pricing,node_payments,node_scheduler,node_reviews toneBlue
class node_request_panel,node_donations,node_tickets,node_dm_router,node_attendance,node_staff_panel toneAmber
class node_admin_panel,node_admin_commands,node_daily_check,node_vip,node_vip_logic toneMint
class node_bot_runtime,node_configuration,node_database,node_sheets,node_cycle,node_embeds toneRose
class node_admin_actor,node_customer_actor,node_staff_actor toneIndigo
```

## Components

### Shop operations

- [Reception bills](https://github.com/pbew/bot-pando/blob/main/cogs/reception.py): `cogs/reception.py`
- [Pricing rules](https://github.com/pbew/bot-pando/blob/main/core/pricing.py): `core/pricing.py`
- [Slip payments](https://github.com/pbew/bot-pando/blob/main/cogs/payments.py): `cogs/payments.py`
- [Job scheduler](https://github.com/pbew/bot-pando/blob/main/cogs/scheduler.py): `cogs/scheduler.py`
- [Reviews](https://github.com/pbew/bot-pando/blob/main/cogs/reviews.py): `cogs/reviews.py`

### Staff and customers

- [Request panel](https://github.com/pbew/bot-pando/blob/main/cogs/requestpanel.py): `cogs/requestpanel.py`
- [Donations](https://github.com/pbew/bot-pando/blob/main/cogs/donate.py): `cogs/donate.py`
- [DM tickets](https://github.com/pbew/bot-pando/blob/main/cogs/tickets.py): `cogs/tickets.py`
- [DM router](https://github.com/pbew/bot-pando/blob/main/cogs/dmrouter.py): `cogs/dmrouter.py`
- [Attendance](https://github.com/pbew/bot-pando/blob/main/cogs/attendance.py): `cogs/attendance.py`
- [Staff panel](https://github.com/pbew/bot-pando/blob/main/cogs/staffpanel.py): `cogs/staffpanel.py`

### Administration

- [Admin panel](https://github.com/pbew/bot-pando/blob/main/cogs/adminpanel.py): `cogs/adminpanel.py`
- [Admin commands](https://github.com/pbew/bot-pando/blob/main/cogs/admin.py): `cogs/admin.py`
- [Daily check-in](https://github.com/pbew/bot-pando/blob/main/cogs/dailycheck.py): `cogs/dailycheck.py`
- [VIP service](https://github.com/pbew/bot-pando/blob/main/cogs/vip.py): `cogs/vip.py`
- [VIP lifecycle](https://github.com/pbew/bot-pando/blob/main/core/vip_logic.py): `core/vip_logic.py`

### Runtime and data

- [Bot runtime](https://github.com/pbew/bot-pando/blob/main/bot.py): `bot.py`
- [Configuration](https://github.com/pbew/bot-pando/blob/main/core/config.py): `core/config.py`
- [SQLite data](https://github.com/pbew/bot-pando/blob/main/core/database.py): `core/database.py`
- [Google Sheets](https://github.com/pbew/bot-pando/blob/main/core/sheets.py): `core/sheets.py`
- [Cycle calculations](https://github.com/pbew/bot-pando/blob/main/core/cycle.py): `core/cycle.py`
- [Discord embeds](https://github.com/pbew/bot-pando/blob/main/core/embeds.py): `core/embeds.py`

### Other components

- **Admin**
- **Customer**
- **Staff**

## Connections

- Admin → Reception bills: opens bills (evidence: `README.md`)
- Reception bills → Pricing rules: quotes services (evidence: `cogs/reception.py`)
- Reception bills → Attendance: checks availability (evidence: `cogs/reception.py`)
- Reception bills → Slip payments: requests payment
- Customer → Slip payments: submits slip (evidence: `README.md`)
- Admin → Slip payments: confirms slip (evidence: `README.md`)
- Slip payments → Job scheduler: updates job
- Job scheduler → Reviews: invites review (evidence: `README.md`)
- Customer → Request panel: browses services (evidence: `README.md`)
- Request panel → Donations: starts donation (evidence: `README.md`)
- Customer → DM tickets: asks questions (evidence: `README.md`)
- Staff → Attendance: clocks in (evidence: `README.md`)
- Staff → Staff panel: checks work (evidence: `README.md`)
- Admin → Admin panel: manages shop (evidence: `README.md`)
- Admin → Admin commands: runs commands (evidence: `README.md`)
- Staff → Daily check-in: checks in (evidence: `README.md`)
- VIP service → VIP lifecycle: uses lifecycle (evidence: `cogs/vip.py`)
- Bot runtime → Configuration: loads config (evidence: `bot.py`)
- Bot runtime → SQLite data: connects database (evidence: `bot.py`)
- Bot runtime → Google Sheets: starts sheets (evidence: `bot.py`)
- Attendance → Cycle calculations: uses cycle (evidence: `cogs/attendance.py`)
- Reception bills → Discord embeds: uses embeds (evidence: `cogs/reception.py`)
- Slip payments → Pricing rules: uses pricing (evidence: `cogs/payments.py`)
- Slip payments → Cycle calculations: uses cycle (evidence: `cogs/payments.py`)
- Reviews → Discord embeds: uses embeds (evidence: `cogs/reviews.py`)
- Admin panel → Discord embeds: uses embeds (evidence: `cogs/adminpanel.py`)
