Kaiheila WebSocket 以及 V3 API 请求收发接口集合
使用示例:
安装:
npm i kaiheila-ws
WebSocket (Bot):
import { KaiheilaWS } from 'kaiheila-ws'
let kaiheiws = new KaiheilaWS({
type: "Bot",
Bot: {
token: ""
},
retry: true
})
kaiheiws.on("Message", r => { console.log(r) })
kaiheiws.connect()
WebSocket (User):
import { KaiheilaWS } from 'kaiheila-ws'
let kaiheiws = new KaiheilaWS({
type: "Use
1