Skip to content

Tsuk1ko/node-cq-websocket

 
 

Repository files navigation

node-cq-websocket

此 fork 为 Tsuk1ko/cq-picsearcher-bot 专用,仅适配 Mrs4s/go-cqhttp

🎉 功能/特色

  • 輕鬆配置, 快速搭建 QQ 聊天機器人。
  • 自動維護底層連線, 開發者只需專注在聊天應用的開發。若斷線, 可依照配置重新連線
  • 支持消息監聽器內, 快速響應

🗎 SDK 文件

閱讀更多 ➡️

🛠️ 開發者看板

本 SDK 採用 ava 框架執行測試。

建置 demo/webpack

npm run build-demo

打包 /demo/webpack/app.js 內容, 在 /demo/webpack/www 目錄下產生一個 bundle.js

開發日誌

閱讀更多 ➡️

Known Issues

  • CQHTTP API 插件尚未支援收發 Fragmant, 暫時禁用
  • 在 Node 10.x 下, Buffer 寫入時的 RangeError (發生在 SDK 調用 API 方法時)。

    這是 Node 的問題, 暫時使用 Node 8.x 以下就沒問題。

    RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received -805456141
        at checkInt (internal/buffer.js:35:11)
        at writeU_Int32BE (internal/buffer.js:625:3)
        at Buffer.writeUInt32BE (internal/buffer.js:638:10)
        at WebSocketFrame.toBuffer (/***/node-cq-websocket/node_modules/websocket/lib/WebSocketFrame.js:257:24)
        at WebSocketConnection.sendFrame (/***/node-cq-websocket/node_modules/websocket/lib/WebSocketConnection.js:857:43)
        at WebSocketConnection.fragmentAndSend (/***/node-cq-websocket/node_modules/websocket/lib/WebSocketConnection.js:793:14)
        at WebSocketConnection.sendUTF (/***/node-cq-websocket/node_modules/websocket/lib/WebSocketConnection.js:733:10)
        at W3CWebSocket.send (/***/node-cq-websocket/node_modules/websocket/lib/W3CWebSocket.js:116:26)
    

About

A Node SDK for developing QQ chatbots based on WebSocket, which is depending on go-cqhttp.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%