A Node.js SDK for developing QQ chatbots via WebSocket, depending on CoolQ and the CQHTTP API plugin. Version 2.1.1 is the latest stable release. It provides automatic connection maintenance, fast response support in message listeners, and automatic retrieval of the bot's QQ number on connection. Differentiators include easy configuration and focus on chatbot development, but it is in beta and known to have issues with Node 10.x and pending CQHTTP API features. Release cadence appears irregular.
npm install cq-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import, connect, listen for messages, and handle cleanup with CQWebSocket.
Use Node.js 8.x or downgrade to an older Node version. No fix available in the library.
Avoid using Fragment functionality; it is disabled by design.
Use with caution and report issues.
Consider alternative QQ bot platforms or SDKs.
Downgrade to Node.js 8.x or use a patched websocket library.
Use `import CQWebSocket from 'cq-websocket'` (default import) or `const CQWebSocket = require('cq-websocket').default` in CommonJS.Specify a different port in the constructor: `new CQWebSocket({ port: 8081 })`.