How ajdgg/nonebot-plugin-calc24 works
This is a small NoneBot 24-point game plugin. A user starts a round or changes continuous-mode settings through the command handler; the plugin generates a puzzle, accepts replies, validates answers, and either ends the round or starts another. It also supports puzzle replacement, explicit exit, help, and a five-minute inactivity timeout. The graph follows relationships visible in the excerpts and README; it does not infer additional routing or storage behavior from unsampled code.
Main entry points: __init__.py Command and session handlers · file_handle.py JSON file access · xj_calc24.py Puzzle generation and validation · calc24-data.json Puzzle and mode data
Components 7
Chat interaction
- Command and session handlers
nonebot_plugin_calc24/__init__.py - Inactivity timeout
nonebot_plugin_calc24/__init__.py
Game logic
- Puzzle generation and validation
nonebot_plugin_calc24/xj_calc24.py
State and persistence
- JSON file access
nonebot_plugin_calc24/file_handle.py - Puzzle and mode data
nonebot_plugin_calc24/calc24-data.json
Other components
- Chat user
- NoneBot runtime
Connections 8
- Chat user → NoneBot runtime: sends commands
README.md - NoneBot runtime → Command and session handlers: dispatches events
nonebot_plugin_calc24/__init__.py - Command and session handlers → NoneBot runtime: sends replies
nonebot_plugin_calc24/__init__.py - Command and session handlers → Puzzle generation and validation: generates and checks
nonebot_plugin_calc24/__init__.py - Command and session handlers → Inactivity timeout: schedules timeout
nonebot_plugin_calc24/__init__.py - Command and session handlers → JSON file access: reads and changes mode
nonebot_plugin_calc24/__init__.py - Puzzle generation and validation → JSON file access: reads puzzle data
nonebot_plugin_calc24/xj_calc24.py - JSON file access → Puzzle and mode data: reads and writes JSON
nonebot_plugin_calc24/file_handle.py