WeChatAssistant: A Smart Assistant Plugin System for WeChat
What is the WeChat Intelligent Assistant Plugin System?
The WeChat Intelligent Assistant Plugin System (WeChatAssistant) is a modular and extensible plugin system developed based on the Wujie BNCR framework, which can provide intelligent auxiliary functions for WeChat, such as weather queries, AI conversations, and schedule reminders. It adopts a plugin-based architecture for easy extension and maintenance, supports configuration-driven and hot reload, has multiple AI models built in, and manages sensitive information through environment variables to ensure security.
What is the Wujie BNCR Framework?
Wujie BNCR is a cross-platform bot framework that supports multiple platforms including WeChat, QQ, and Telegram. The WeChat Intelligent Assistant Plugin System is specifically designed for the Wujie BNCR framework and can be seamlessly integrated into the Wujie BNCR environment, providing rich functional extensions for the WeChat platform.

Features of the WeChat Intelligent Assistant Plugin System
Plugin-based architecture: All features are implemented through plugins for easy extension and maintenance.
Configuration-driven: All features are driven by configuration files, no recompilation required.
AI integration: Built-in support for multiple AI models, easily extensible.
Hot reload: Plugin code changes are automatically reloaded.
Security mechanism: Plugin permission isolation to prevent malicious operations.
Wujie BNCR compatibility: Fully compatible with the Wujie BNCR framework and can be used as a Wujie BNCR plugin.
Sensitive information protection: Manages sensitive information such as API keys through environment variables to avoid information leakage.
Permission management system: Comprehensive user permission control, distinguishing between regular users and administrators.
Architecture of the WeChat Intelligent Assistant Plugin System
Core module: core.js, responsible for plugin loading and message routing.
Plugin loader: plugin-loader.js, responsible for initializing and monitoring plugin changes.
Configuration manager: config-manager.js, handles sensitive information and configuration merging.
Permission manager: permission-manager.js, handles user permissions and command access control.
Configuration files: config.json (for local use, not committed), config.example.json (configuration example, without sensitive information).
Environment variable files: .env (for local use, not committed), .env.example (environment variable example).
Plugin directory: plugins/, containing various plugins such as weather plugin, AI chat plugin, morning briefing reminder plugin, etc.
Main entry file: 智能助手.js.
Installation Method
Prerequisites
Node.js (v14.0.0+)
npm or yarn
Wujie BNCR framework environment
Install as a Wujie BNCR Plugin
Navigate to the Wujie BNCR plugin directory.
Clone the repository.
Install dependencies.
Configure sensitive information, create the environment variable file and fill in the necessary API keys.
Create the local configuration file and adjust non-sensitive settings as needed.
Restart the BNCR framework, and the system will automatically load the plugin.
Standalone Use
Clone the repository.
Install dependencies.
Configure the environment variables and configuration files following the steps above.
Start.
Sensitive Information Management
Environment variables: All sensitive information such as API keys is stored in the .env file, which will not be committed to the code repository.
Configuration separation: Each plugin's configuration is divided into public configuration and sensitive configuration.
Configuration manager: Automatically loads and merges configurations from different sources.
Usage Instructions
General commands: e.g., /help to display help information, /plugins list to list all available plugins, etc.
Weather plugin: e.g., /weather city name to query real-time weather for the specified city.
AI chat plugin: e.g., /chat content to converse with the AI.
Morning briefing reminder plugin: e.g., /morning on to enable the daily morning briefing reminder.
Permission management commands (administrators only): e.g., /admin list to list all administrator users.
How to Develop New Plugins
Create a new plugin directory under the plugins/ directory.
Create an index.js file and implement the plugin interface.
Add the plugin's default configuration to the config.example.json file.
Update the rule markers (@rule) in 智能助手.js.
Enable the plugin in the global configuration.
Github URL:https://github.com/2013888483/WeChatAssistant
Script Planner Assistant▸
AI Apps
AI News 