<p align="center">
<a href="https://ishkong.github.io/go-cqhttp-docs/">
<img src="https://user-images.githubusercontent.com/25968335/120111974-8abef880-c139-11eb-99cd-fa928348b198.png" width="200" height="200" alt="go-cqhttp">
</a>
</p>
<div align="center">
# go-cqhttp
_✨ 基于 [Mirai](https://github.com/mamoe/mirai) 以及 [MiraiGo](https://github.com/Mrs4s/MiraiGo) 的 [OneBot](https://github.com/howmanybots/onebot/blob/master/README.md) Golang 原生实现 ✨_
</div>
<p align="center">
<a href="https://raw.githubusercontent.com/Mrs4s/go-cqhttp/master/LICENSE">
<img src="https://img.shields.io/github/license/Mrs4s/go-cqhttp" alt="license">
</a>
<a href="https://github.com/Mrs4s/go-cqhttp/releases">
<img src="https://img.shields.io/github/v/release/Mrs4s/go-cqhttp?color=blueviolet&include_prereleases" alt="release">
</a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FMrs4s%2Fgo-cqhttp?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FMrs4s%2Fgo-cqhttp.svg?type=shield"/></a>
<a href="https://github.com/howmanybots/onebot/blob/master/README.md">
<img src="https://img.shields.io/badge/OneBot-v11-blue?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAADAwMHBwceHh4UFBQNDQ0ZGRkoKCgvLy8iIiLWSdWYAAAAAXRSTlMAQObYZgAAAQVJREFUSMftlM0RgjAQhV+0ATYK6i1Xb+iMd0qgBEqgBEuwBOxU2QDKsjvojQPvkJ/ZL5sXkgWrFirK4MibYUdE3OR2nEpuKz1/q8CdNxNQgthZCXYVLjyoDQftaKuniHHWRnPh2GCUetR2/9HsMAXyUT4/3UHwtQT2AggSCGKeSAsFnxBIOuAggdh3AKTL7pDuCyABcMb0aQP7aM4AnAbc/wHwA5D2wDHTTe56gIIOUA/4YYV2e1sg713PXdZJAuncdZMAGkAukU9OAn40O849+0ornPwT93rphWF0mgAbauUrEOthlX8Zu7P5A6kZyKCJy75hhw1Mgr9RAUvX7A3csGqZegEdniCx30c3agAAAABJRU5ErkJggg==" alt="cqhttp">
</a>
<a href="https://github.com/Mrs4s/go-cqhttp/actions">
<img src="https://github.com/Mrs4s/go-cqhttp/workflows/CI/badge.svg" alt="action">
</a>
<a href="https://goreportcard.com/report/github.com/Mrs4s/go-cqhttp">
<img src="https://goreportcard.com/badge/github.com/Mrs4s/go-cqhttp" alt="GoReportCard">
</a>
</p>
<p align="center">
<a href="https://docs.go-cqhttp.org/">文档</a>
·
<a href="https://github.com/Mrs4s/go-cqhttp/releases">下载</a>
·
<a href="https://docs.go-cqhttp.org/guide/quick_start.html">开始使用</a>
·
<a href="https://github.com/Mrs4s/go-cqhttp/blob/master/CONTRIBUTING.md">参与贡献</a>
</p>
## 兼容性
go-cqhttp 兼容 [OneBot-v11](https://github.com/botuniverse/onebot-11) 绝大多数内容,并在其基础上做了一些扩展,详情请看 go-cqhttp 的文档。
### 接口
- [x] HTTP API
- [x] 反向 HTTP POST
- [x] 正向 WebSocket
- [x] 反向 WebSocket
### 拓展支持
> 拓展 API 可前往 [文档](docs/cqhttp.md) 查看
- [x] HTTP POST 多点上报
- [x] 反向 WS 多点连接
- [x] 修改群名
- [x] 消息撤回事件
- [x] 解析/发送 回复消息
- [x] 解析/发送 合并转发
- [x] 使用代理请求网络图片
### 实现
<details>
<summary>已实现 CQ 码</summary>
#### 符合 OneBot 标准的 CQ 码
| CQ 码 | 功能 |
| ------------ | --------------------------- |
| [CQ:face] | [QQ 表情] |
| [CQ:record] | [语音] |
| [CQ:video] | [短视频] |
| [CQ:at] | [@某人] |
| [CQ:share] | [链接分享] |
| [CQ:music] | [音乐分享] [音乐自定义分享] |
| [CQ:reply] | [回复] |
| [CQ:forward] | [合并转发] |
| [CQ:node] | [合并转发节点] |
| [CQ:xml] | [XML 消息] |
| [CQ:json] | [JSON 消息] |
[qq 表情]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#qq-%E8%A1%A8%E6%83%85
[语音]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E8%AF%AD%E9%9F%B3
[短视频]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E7%9F%AD%E8%A7%86%E9%A2%91
[@某人]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E6%9F%90%E4%BA%BA
[链接分享]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E9%93%BE%E6%8E%A5%E5%88%86%E4%BA%AB
[音乐分享]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E9%9F%B3%E4%B9%90%E5%88%86%E4%BA%AB-
[音乐自定义分享]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E9%9F%B3%E4%B9%90%E8%87%AA%E5%AE%9A%E4%B9%89%E5%88%86%E4%BA%AB-
[回复]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E5%9B%9E%E5%A4%8D
[合并转发]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91-
[合并转发节点]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E8%8A%82%E7%82%B9-
[xml 消息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#xml-%E6%B6%88%E6%81%AF
[json 消息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/message/segment.md#json-%E6%B6%88%E6%81%AF
#### 拓展 CQ 码及与 OneBot 标准有略微差异的 CQ 码
| 拓展 CQ 码 | 功能 |
| -------------- | --------------------------------- |
| [CQ:image] | [图片] |
| [CQ:redbag] | [红包] |
| [CQ:poke] | [戳一戳] |
| [CQ:node] | [合并转发消息节点] |
| [CQ:cardimage] | [一种 xml 的图片消息(装逼大图)] |
| [CQ:tts] | [文本转语音] |
[图片]: https://docs.go-cqhttp.org/cqcode/#%E5%9B%BE%E7%89%87
[红包]: https://docs.go-cqhttp.org/cqcode/#%E7%BA%A2%E5%8C%85
[戳一戳]: https://docs.go-cqhttp.org/cqcode/#%E6%88%B3%E4%B8%80%E6%88%B3
[合并转发消息节点]: https://docs.go-cqhttp.org/cqcode/#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E6%B6%88%E6%81%AF%E8%8A%82%E7%82%B9
[一种 xml 的图片消息(装逼大图)]: https://docs.go-cqhttp.org/cqcode/#cardimage
[文本转语音]: https://docs.go-cqhttp.org/cqcode/#%E6%96%87%E6%9C%AC%E8%BD%AC%E8%AF%AD%E9%9F%B3
</details>
<details>
<summary>已实现 API</summary>
#### 符合 OneBot 标准的 API
| API | 功能 |
| ------------------------ | ---------------------- |
| /send_private_msg | [发送私聊消息] |
| /send_group_msg | [发送群消息] |
| /send_msg | [发送消息] |
| /delete_msg | [撤回信息] |
| /set_group_kick | [群组踢人] |
| /set_group_ban | [群组单人禁言] |
| /set_group_whole_ban | [群组全员禁言] |
| /set_group_admin | [群组设置管理员] |
| /set_group_card | [设置群名片(群备注)] |
| /set_group_name | [设置群名] |
| /set_group_leave | [退出群组] |
| /set_group_special_title | [设置群组专属头衔] |
| /set_friend_add_request | [处理加好友请求] |
| /set_group_add_request | [处理加群请求/邀请] |
| /get_login_info | [获取登录号信息] |
| /get_stranger_info | [获取陌生人信息] |
| /get_friend_list | [获取好友列表] |
| /get_group_info | [获取群信息] |
| /get_group_list | [获取群列表] |
| /get_group_member_info | [获取群成员信息] |
| /get_group_member_list | [获取群成员列表] |
| /get_group_honor_info | [获取群荣誉信息] |
| /can_send_image | [检查是否可以发送图片] |
| /can_send_record | [检查是否可以发送语音] |
| /