Giter VIP home page Giter VIP logo

mirai-sdk-http's Introduction

mirai-api-http的Go SDK

这个库不再维护了,建议改用onebot

这是针对mirai-api-http编写的Go SDK。

相较于直接使用mirai-core和mirai-console而言,mirai-api-http的好处是,在你更新代码时,你无需进行重新登录。

开始

在使用本项目之前,你应该知道如何使用mirai进行登录,并安装mirai-api-http插件。

请多参阅mirai-api-http的文档

本项目使用ws接口,因此你需要修改mirai的配置文件config/net.mamoe.mirai-api-http/setting.yml,开启ws监听。

adapters:
  - ws
verifyKey: ABCDEFGHIJK
adapterSettings:
  ws:
    ## websocket server 监听的本地地址
    ## 一般为 localhost 即可, 如果多网卡等情况,自定设置
    host: localhost

    ## websocket server 监听的端口
    ## 与 http server 可以重复, 由于协议与路径不同, 不会产生冲突
    port: 8080

    ## 就填-1
    reservedSyncId: -1

引入项目:

go get -u github.com/CuteReimu/mirai-sdk-http

关于如何使用,可以参考examples文件夹下的例子

进度

目前已支持的功能有:

  • 消息链
    • 所有消息类型
    • 所有消息解析
    • 所有其它客户端同步消息解析
  • 事件
    • Bot自身事件
    • 好友事件
    • 群事件
    • 申请事件
    • 其它客户端事件
    • 命令事件
  • 请求
    • 获取插件信息
    • 缓存操作
    • 获取账号信息
    • 消息发送与撤回
    • 文件操作
    • 多媒体内容上传
    • 账号管理
    • 群管理
    • 群公告
    • 事件处理
    • Console命令
  • 其它
    • 连接与认证
    • 断线重连
    • MiraiCode解析
    • 请求限流

mirai-sdk-http's People

Contributors

cutereimu avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.