A Koishi plugin adapter for wechat-robot-client that enables WeChat bot integration with Koishi chatbot framework. Version 2.1.3 adds support for Webhook real-time push and MySQL polling message reception modes, with hybrid mode for maximum reliability. Unlike other WeChat adapters that rely solely on WebSocket or polling, this plugin provides a configurable mode selector, automatic reconnect with health checks every 30 seconds, and support for group/private messages, media forwarding, and @mention parsing. It requires Koishi ^4.0.0 as a peer dependency and optionally MySQL for polling mode. The plugin is actively maintained with a focus on production reliability.
npm install koishi-plugin-adapter-wechat-robotNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal Webhook mode setup for the Koishi adapter, including configuration and required client DB update.
Set endpoint to http://<client-host>:<client-port> (e.g., http://127.0.0.1:9000)
Add mode: 'webhook' | 'polling' | 'mixed' to your plugin configuration
Explicitly set mode field, e.g., mode: 'webhook'
If you want to disable polling, remove all mysql* config fields or set mode: 'webhook' instead of 'mixed'
For Docker Compose, set mysqlHost to the MySQL service name defined in docker-compose.yml
Ensure wechat-robot-client is running and endpoint points to its API address (e.g., http://wechat-robot-client:9000)
Verify mysqlUser, mysqlPassword, and that the user has SELECT on the messages table in the specified mysqlDatabase
Run `yarn add koishi-plugin-adapter-wechat-robot` or install via Koishi plugin marketplace