How bobliu0518/blbot works
BLBot is a lightweight QQ bot built on the kjBot framework and designed for OneBot-compatible runtimes. Its principal workflow is a QQ message entering the public runtime, being processed as a command or non-command middleware event, dispatched to a feature module, and turned into a reply. Feature areas include account/economy, games, transit lookups, and utilities; scheduled jobs form a separate path. The README documents MongoDB and OneBot dependencies. Some processor and SDK wiring is inferred from the documented framework layout and tree; sampled modules confirm data access and reply behavior, but not every dispatch detail.
Main entry points: messageProcessor.php Message processor · index.php Runtime entry · Database.php Data access · cr Transit information
Components 23
Bot runtime
- Runtime entry
public/index.php - Initialization
public/init.php - Message processor
public/messageProcessor.php - Notice processor
public/noticeProcessor.php - Meta processor
public/meta_eventProcessor.php - Request processor
public/requestProcessor.php - Message sender
public/MessageSender.php - OneBot SDK
SDK/CoolQ.php
Middleware
- Middleware chain
middleWare/Chain.php - Non-command handlers
middleWare
Bot features
- Accounts and economy
module/credit - Games and interaction
module/rh - Transit information
module/cr - Text and utilities
module/base64 - Group and profile
module/alias - External information
module/weather
State and scheduling
- Data access
public/Database.php - Scheduler runtime
public/Scheduler.php - Scheduled jobs
scheduler
External integrations
- MongoDB
- Information APIs
Other components
- QQ user
- OneBot runtime
Connections 28
- QQ user → OneBot runtime: sends event
- OneBot runtime → Runtime entry: delivers events
- Runtime entry → Initialization: initializes
- Runtime entry → Message processor: processes messages
- Runtime entry → Notice processor: routes notices
- Runtime entry → Meta processor: routes metadata
- Runtime entry → Request processor: routes requests
- Message processor → Middleware chain: runs middleware
- Middleware chain → Non-command handlers: dispatches handlers
- Message processor → Accounts and economy: dispatches commands
- Message processor → Games and interaction: dispatches commands
- Message processor → Transit information: dispatches commands
- Message processor → Text and utilities: dispatches commands
- Message processor → Group and profile: dispatches commands
- Message processor → External information: dispatches commands
- Accounts and economy → Data access: reads and writes
- Games and interaction → Data access: reads and writes
- Transit information → Data access: reads cached data
- External information → Data access: reads cached data
- Data access → MongoDB: persists data
- Message processor → Message sender: queues replies
- Message sender → OneBot SDK: sends messages
- OneBot SDK → OneBot runtime: calls API
- Runtime entry → Scheduler runtime: starts runtime
- Scheduler runtime → Scheduled jobs: runs jobs
- Scheduled jobs → Data access: accesses data
- Transit information → Information APIs: queries schedules
- External information → Information APIs: queries information