How anxi78/yuanbao_bot_client works
YuanBao Bot Client is a Python WebSocket client for interacting with Tencent Yuanbao Bot. Its main workflow is terminal commands into the sender, which authenticates and exchanges messages with the platform; the README documents messaging, group operations, media, automation, and AI-image features. A separate monitor listens for group events, stores messages in SQLite, and handles recall notifications. Plugin loading and the lexicon engine are additional runtime capabilities. The excerpts are partial, so some documented features are represented at the sender boundary rather than as independently verified internal modules.
Main entry points: sender.py Command handling · group_monitor.py Monitor client · plugin_loader.py Plugin API · main.py Example plugin
Components 19
Interactive client
- Interactive sender
sender.py - Bot authentication
sender.py - WebSocket session
sender.py - Command handling
sender.py - Message operations
sender.py - Group operations
sender.py - Auto-reply and proxy
sender.py - Media and stickers
sender.py
Extensions
- Plugin manager
plugin_loader.py - Plugin API
plugin_loader.py - Example plugin
plugins/example/main.py
Group monitoring
- Monitor client
group_monitor.py - Message store
group_monitor.py - Recall handling
group_monitor.py
Reply rules
- Lexicon engine
lexicon.py - Rule text files
词库
Other components
- Terminal user
- Tencent COS
- Yuanbao platform
Connections 21
- Terminal user → Interactive sender: enters commands
- Interactive sender → Command handling: dispatches input
- Interactive sender → Bot authentication: signs in
- Bot authentication → Yuanbao platform: requests token
- Interactive sender → WebSocket session: starts session
- WebSocket session → Yuanbao platform: exchanges events
- Command handling → Message operations: invokes sends
- Command handling → Group operations: queries groups
- Command handling → Auto-reply and proxy: controls modes
- Command handling → Media and stickers: sends media
- Media and stickers → Tencent COS: uploads files
- Plugin manager → Example plugin: loads plugin
- Example plugin → Plugin API: registers handlers
- Plugin API → Interactive sender: calls sender
- Terminal user → Monitor client: starts monitor
- Monitor client → Yuanbao platform: listens and sends
- Monitor client → Message store: stores messages
- Monitor client → Recall handling: handles recall events
- Recall handling → Message store: looks up originals
- Recall handling → Yuanbao platform: sends notifications
- Lexicon engine → Rule text files: loads rules