onebot-sdk

module
v0.0.0-...-5349944 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: MIT

README

onebot-sdk

onebot-sdk

注意事项

  • *11.0.15*之后(不包含)出现不兼容变动,变更仍在继续,预计持续1-2个月

配置变更

  • 原配置
    http:
      schema: "http"
      host: 127.0.0.1
      port: 5700
    websocket:
      host: 127.0.0.1
      port: 6700
    SUPERUSERS: # 超级管理员账号
     - 123456789
    
  • 新配置
    api:
    	type: websocket
    	endpoint: "ws://127.0.0.1:6700/api"
    	accessToken: ""
    	secret: "" # 暂不支持
    event:
    	type: websocket
    	addr: "0.0.0.0:8080" # go-cqhttp配置为 ws-reverse api: ws://${程序启动ip}:8080/api
    	accessToken: ""
    	secret: "" # 支持不完善
    

需要进行实例化

Wiki

介绍实现/命名规则等

待处理事项

  • http支持
  • 反向http支持
  • websocket支持
  • 反向websocket支持
  • access-token支持
  • 调用超时设置支持
    • api调用可以配置超时时间,单位ms,默认值为10000
  • 消息格式支持
    • array支持
    • CQ码支持
  • secret支持
  • 支持onebot-v12
  • protobuf
    • model
    • api
    • event

快速开始

引用

go get github.com/dezhishen/onebot-sdk@${tag}

${tag}请参考releases中的版本号和对应的onebot协议 11.x支持onebotv11协议,其他版本类似

发送API

响应事件

WebSocket事件分为注册和启用两步

功能点清单

API

EVENT

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL