npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@xud6/cq-websocket

v2.1.2

Published

A Node SDK for developing QQ chatbots based on WebSocket, which is depending on CoolQ and CQHTTP API plugin.

Downloads

2

Readme

node-cq-websocket

npm npm license CQHttp Commitizen friendly semantic-release Known Vulnerabilities

🚧 分支狀態

  • 主線
    • Build Status
    • Coverage Status
  • dev
    • Build Status
    • Coverage Status

🗯️ 關於此 SDK

依賴 CQHTTP API 插件的 websocket 接口, 為 NodeJs 開發者提供一個搭建 QQ 聊天機器人的 SDK。

關於 CQHTTP API 插件,見 richardchien/coolq-http-api

本 SDK 尚處於測試階段,使用上仍有機會碰到Bug,歡迎提交PR或issue回報。

由於付費問題,本 SDK 目前僅針對酷Q Air做測試。

🎉 功能/特色

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

🗎 SDK 文件

閱讀更多 ➡️

🛠️ 開發者看板

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

打包 CQWebSocket 至 browser 環境

npm run build

使用 webpack 將 SDK 及所有依賴打包, 並在 /dist目錄下產生一個 cq-websocket.min.js

建置 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)

🍙 歡迎餵食

請勿拍打 🤜 無限期掙飯中 ☕