GithubHelp home page GithubHelp logo

gomirai's Introduction

建议使用 MiraiGo-Template

目前gomirai已经有段时间没有维护,并且Mirai-Api-Http也在重构中,可能有不兼容的情况

建议使用基于MiraiMiraiGo的便于开发的MiraiGo-Template

Go-Mirai

Go ReportGitHub top languageGitHubGitHub go.mod Go versionGitHub contributors

适配MiraiHttpApi的Go SDK

已完成所有基本功能

已完成所有基础功能,但随着日后更新及优化,目前API仍有可能发生变化

目前工作

为使用者提供更加方便的事件处理函数

如何使用

请参照example

所有导出函数、变量、结构均有详细注释

不了解Go?

(安利狂魔) Go急速入门

目前问题

暂无

仍未实现

  • websocket
  • 上报
  • 心跳

维护者

Logiase

许可证

AGPL-3.0 © Logiase

gomirai's People

Contributors

andyhuzhill avatar logiase avatar ssttkkl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gomirai's Issues

InEvent.SenderDetail() : sender 序列化失败

当接收到好友的文本、表情、图片或上述三个消息组合而成的消息时,InEvent.SenderDetail( )提示 sender 序列化失败。
其它类型的消息暂未测试。

操作系统:Windows10 X64 1909
依赖版本

  • mirai-console-wrapper-1.2.0-all
  • mirai-console-0.5.1
  • mirai-core-qqandroid-jvm-1.0-RC2-1
  • mirai-api-http-v1.7.0

http-api返回格式有所改动。FetchMessage会报错cannot unmarshal object into Go value of type []gomirai.InEvent

FetchMessage报错cannot unmarshal object into Go value of type []gomirai.InEvent

测试代码如下:

var respS []gomirai.InEvent
str := `{"code":0,"errorMessage":"","data":[{"type":"FriendMessage","messageChain":[{"type":"Source","id":1111111111,"time":1586940031},{"type":"Plain","text":"哈哈哈"}],"sender":{"id":123456789,"nickname":"Batty","remark":""}}]}`
err := json.Unmarshal([]byte(str), &respS)
if err != nil {
	fmt.Println(err)
}
fmt.Printf("%#v\n", respS)

这个机器人怎么用啊,主页的哪个 e 什么的链接点进去了啥都看不懂,还有急速入门里面也全是英文,点了那个围棋之旅也进不去,有没有中文的文章

求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊求助啊

回复中文的时候乱码

b.SendFriendMessage(e.Sender.Id, 0, message.PlainMessage("中文消息"))

实际上回复的消息是:
中���

按照例子写的代码无法运行

�[0m�[0Kimport cycle not allowed�[0K�[?25l
package awesomeProject4�[0K
        imports github.com/Logiase/gomirai/bot�[0K
        imports github.com/Logiase/gomirai/helper�[0K
        imports github.com/Logiase/gomirai/bot�[0K
�[0K�[?25h

只替换了例子中的QQID与httpapi地址,无其他任何import添加。

如何得到进群成员的信息呢?

下面是我收到 MemberJoinEvent 之后打印出来的事件内容
MemberJoinEvent
{MemberJoinEvent [] {0 {0 }} 0 0 0}

都是空的,没有成员信息。

如何得到进群成员的信息呢?

求助

本人小白一枚,没有任何编程经验,你这一大堆的都没有exe要怎么运行啊

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.