How wbndmqaq/astrbot_plugin_dagongren works
This is an AstrBot group-chat workplace-life simulation: users issue commands, domain services update player state and produce a result, then the plugin renders and sends it. The graph also preserves the documented management panel, backups, scheduled lottery/push behavior, and major gameplay branches. Some domain handlers and services were not sampled; their placement and links are based on the README’s architecture and capability descriptions, not inspection of their implementations.
Main entry points: _core.py SQLite storage · main.py Plugin runtime · review.py Annual review · logic.py Shared rules
Components 27
Command interaction
- Plugin runtime
main.py - Route installer
handlers/base.py - Career commands
handlers/career_cmds.py - Life commands
handlers/life_cmds.py - Finance commands
handlers/finance_cmds.py - Stock commands
handlers/stock_cmds.py
Career and life
- Career services
core/career.py - Life services
core/life.py - Office and travel
core/life2.py - Annual review
core/review.py
Social and finance
- Duel and ranking
core/social.py - Bank and funds
core/finance.py - Stock market
core/stocks.py - Lottery
core/lottery.py
Shared runtime
- SQLite storage
core/db/_core.py - Storage schema
core/db/_const.py - Game data
core/gamedata.py - Shared rules
core/logic.py - Command result
core/result.py - Output renderer
core/renderer.py - Online backups
core/backup.py
Management panel
- WebUI server
webui/server/_serve.py - Admin APIs
webui/server/_admin.py - Core adapters
webui/server/_deps.py - Panel client
webui/app.js - Web authentication
core/web_auth.py
Other components
- Players
Connections 38
- Players → Route installer: issues commands
README.md - Plugin runtime → Route installer: installs routes
main.py - Route installer → Career commands: dispatches
README.md - Route installer → Life commands: dispatches
README.md - Career commands → Career services: calls
- Life commands → Life services: calls
README.md - Career commands → Annual review: routes review
README.md - Finance commands → Bank and funds: calls
- Stock commands → Stock market: calls
handlers/stock_cmds.py - Plugin runtime → Output renderer: renders output
main.py - Plugin runtime → SQLite storage: initializes
main.py - Plugin runtime → Online backups: creates manager
main.py - Plugin runtime → WebUI server: starts panel
main.py - Plugin runtime → Lottery: runs lottery
main.py - Career services → SQLite storage: reads and writes
- Life services → SQLite storage: reads and writes
- Office and travel → SQLite storage: reads and writes
- Bank and funds → SQLite storage: reads and writes
- Stock market → SQLite storage: trades through
core/stocks.py - Lottery → SQLite storage: reads and writes
core/lottery.py - Duel and ranking → SQLite storage: reads and writes
core/social.py - Annual review → SQLite storage: saves results
core/review.py - SQLite storage → Storage schema: uses schema
core/db/__init__.py - Career services → Shared rules: uses rules
- Career services → Game data: loads content
- Annual review → Shared rules: calculates with
core/review.py - Annual review → Game data: loads grades
core/review.py - Annual review → Command result: returns
core/review.py - Duel and ranking → Shared rules: uses rules
core/social.py - Duel and ranking → Game data: loads content
core/social.py - Stock market → Shared rules: uses rules
core/stocks.py - Lottery → Game data: loads rules
core/lottery.py - Lottery → Shared rules: uses rules
core/lottery.py - WebUI server → Panel client: serves panel
README.md - WebUI server → Admin APIs: registers APIs
webui/server/__init__.py - Admin APIs → Core adapters: uses adapters
webui/server/_admin.py - Core adapters → SQLite storage: imports storage
webui/server/_deps.py - Core adapters → Web authentication: imports auth
webui/server/_deps.py