mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
📝 update readme
This commit is contained in:
parent
05f2503631
commit
7b831cfa1e
130
README.md
130
README.md
@ -1,36 +1,75 @@
|
||||
<p align="center">
|
||||
<a href="https://ishkong.github.io/go-cqhttp-docs/"><img src="https://i.loli.net/2020/12/20/qSLMDWxiocRQgu6.jpg" 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) 开发的cqhttp golang原生实现, 并在[cqhttp原版](https://github.com/richardchien/coolq-http-api)的基础上做了部分修改和拓展.
|
||||
|
||||
文档暂时可前往[Go-cqhttp帮助中心](http://ishkong.github.io/go-cqhttp-docs)查看, 目前还在撰写中.
|
||||
_✨ 基于 [Mirai](https://github.com/mamoe/mirai) 以及 [MiraiGo](https://github.com/Mrs4s/MiraiGo) 的 [cqhttp](https://github.com/howmanybots/onebot/blob/master/README.md) golang 原生实现 ✨_
|
||||
|
||||
测试版可前往 Release 下载
|
||||
</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://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>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="http://ishkong.github.io/go-cqhttp-docs">文档</a>
|
||||
·
|
||||
<a href="https://github.com/Mrs4s/go-cqhttp/releases">下载</a>
|
||||
·
|
||||
<a href="https://ishkong.github.io/go-cqhttp-docs/guide/quick_start.html">开始使用</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
go-cqhttp 在[原版 cqhttp](https://github.com/richardchien/coolq-http-api)的基础上做了部分修改和拓展.
|
||||
|
||||
---
|
||||
|
||||
## 兼容性
|
||||
|
||||
### 接口
|
||||
|
||||
#### 接口
|
||||
- [x] HTTP API
|
||||
- [x] 反向HTTP POST
|
||||
- [x] 正向Websocket
|
||||
- [x] 反向Websocket
|
||||
- [x] 反向 HTTP POST
|
||||
- [x] 正向 Websocket
|
||||
- [x] 反向 Websocket
|
||||
|
||||
#### 拓展支持
|
||||
> 拓展API可前往 [文档](docs/cqhttp.md) 查看
|
||||
- [x] HTTP POST多点上报
|
||||
- [x] 反向WS多点连接
|
||||
### 拓展支持
|
||||
|
||||
> 拓展 API 可前往 [文档](docs/cqhttp.md) 查看
|
||||
|
||||
- [x] HTTP POST 多点上报
|
||||
- [x] 反向 WS 多点连接
|
||||
- [x] 修改群名
|
||||
- [x] 消息撤回事件
|
||||
- [x] 解析/发送 回复消息
|
||||
- [x] 解析/发送 合并转发
|
||||
- [x] 使用代理请求网络图片
|
||||
|
||||
#### 实现
|
||||
### 实现
|
||||
|
||||
<details>
|
||||
<summary>已实现CQ码</summary>
|
||||
|
||||
##### 符合Onebot标准的CQ码
|
||||
| CQ码 | 功能 |
|
||||
| ------------ | ---------------------------- |
|
||||
| [CQ:face] | [QQ表情] |
|
||||
#### 符合 Onebot 标准的 CQ 码
|
||||
|
||||
| CQ 码 | 功能 |
|
||||
| ------------ | --------------------------- |
|
||||
| [CQ:face] | [QQ 表情] |
|
||||
| [CQ:record] | [语音] |
|
||||
| [CQ:video] | [短视频] |
|
||||
| [CQ:at] | [@某人] |
|
||||
@ -39,10 +78,10 @@
|
||||
| [CQ:reply] | [回复] |
|
||||
| [CQ:forward] | [合并转发] |
|
||||
| [CQ:node] | [合并转发节点] |
|
||||
| [CQ:xml] | [XML消息] |
|
||||
| [CQ:json] | [JSON消息] |
|
||||
| [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
|
||||
[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
|
||||
@ -52,18 +91,19 @@
|
||||
[回复]: 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
|
||||
[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 码及与 Onebot 标准有略微差异的 CQ 码
|
||||
|
||||
| 拓展 CQ 码 | 功能 |
|
||||
| -------------- | --------------------------------- |
|
||||
| [CQ:image] | [图片] |
|
||||
| [CQ:redbag] | [红包] |
|
||||
| [CQ:poke] | [戳一戳] |
|
||||
| [CQ:gift] | [礼物] |
|
||||
| [CQ:node] | [合并转发消息节点] |
|
||||
| [CQ:cardimage] | [一种xml的图片消息(装逼大图)] |
|
||||
| [CQ:cardimage] | [一种 xml 的图片消息(装逼大图)] |
|
||||
| [CQ:tts] | [文本转语音] |
|
||||
|
||||
[图片]: docs/cqhttp.md#%E5%9B%BE%E7%89%87
|
||||
@ -71,7 +111,7 @@
|
||||
[戳一戳]: docs/cqhttp.md#%E6%88%B3%E4%B8%80%E6%88%B3
|
||||
[礼物]: docs/cqhttp.md#%E7%A4%BC%E7%89%A9
|
||||
[合并转发消息节点]: docs/cqhttp.md#%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的图片消息(装逼大图)]: docs/cqhttp.md#cardimage-%E4%B8%80%E7%A7%8Dxml%E7%9A%84%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF%E8%A3%85%E9%80%BC%E5%A4%A7%E5%9B%BE
|
||||
[一种 xml 的图片消息(装逼大图)]: docs/cqhttp.md#cardimage-%E4%B8%80%E7%A7%8Dxml%E7%9A%84%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF%E8%A3%85%E9%80%BC%E5%A4%A7%E5%9B%BE
|
||||
[文本转语音]: docs/cqhttp.md#%E6%96%87%E6%9C%AC%E8%BD%AC%E8%AF%AD%E9%9F%B3
|
||||
|
||||
</details>
|
||||
@ -79,7 +119,8 @@
|
||||
<details>
|
||||
<summary>已实现API</summary>
|
||||
|
||||
##### 符合Onebot标准的API
|
||||
#### 符合 Onebot 标准的 API
|
||||
|
||||
| API | 功能 |
|
||||
| ------------------------ | ---------------------- |
|
||||
| /send_private_msg | [发送私聊消息] |
|
||||
@ -107,10 +148,9 @@
|
||||
| /can_send_image | [检查是否可以发送图片] |
|
||||
| /can_send_record | [检查是否可以发送语音] |
|
||||
| /get_version_info | [获取版本信息] |
|
||||
| /set_restart | [重启go-cqhttp] |
|
||||
| /set_restart | [重启 go-cqhttp] |
|
||||
| /.handle_quick_operation | [对事件执行快速操作] |
|
||||
|
||||
|
||||
[发送私聊消息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#send_private_msg-%E5%8F%91%E9%80%81%E7%A7%81%E8%81%8A%E6%B6%88%E6%81%AF
|
||||
[发送群消息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#send_group_msg-%E5%8F%91%E9%80%81%E7%BE%A4%E6%B6%88%E6%81%AF
|
||||
[发送消息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#send_msg-%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF
|
||||
@ -136,11 +176,12 @@
|
||||
[检查是否可以发送图片]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#can_send_image-%E6%A3%80%E6%9F%A5%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%8F%91%E9%80%81%E5%9B%BE%E7%89%87
|
||||
[检查是否可以发送语音]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#can_send_record-%E6%A3%80%E6%9F%A5%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%8F%91%E9%80%81%E8%AF%AD%E9%9F%B3
|
||||
[获取版本信息]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#get_version_info-%E8%8E%B7%E5%8F%96%E7%89%88%E6%9C%AC%E4%BF%A1%E6%81%AF
|
||||
[重启go-cqhttp]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#set_restart-%E9%87%8D%E5%90%AF-onebot-%E5%AE%9E%E7%8E%B0
|
||||
[重启 go-cqhttp]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/public.md#set_restart-%E9%87%8D%E5%90%AF-onebot-%E5%AE%9E%E7%8E%B0
|
||||
[对事件执行快速操作]: https://github.com/howmanybots/onebot/blob/master/v11/specs/api/hidden.md#handle_quick_operation-%E5%AF%B9%E4%BA%8B%E4%BB%B6%E6%89%A7%E8%A1%8C%E5%BF%AB%E9%80%9F%E6%93%8D%E4%BD%9C
|
||||
|
||||
##### 拓展API及与Onebot标准有略微差异的API
|
||||
| 拓展API | 功能 |
|
||||
#### 拓展 API 及与 Onebot 标准有略微差异的 API
|
||||
|
||||
| 拓展 API | 功能 |
|
||||
| --------------------------- | ---------------------- |
|
||||
| /set_group_portrait | [设置群头像] |
|
||||
| /get_image | [获取图片信息] |
|
||||
@ -148,7 +189,7 @@
|
||||
| /get_forward_msg | [获取合并转发内容] |
|
||||
| /send_group_forward_msg | [发送合并转发(群)] |
|
||||
| /.get_word_slices | [获取中文分词] |
|
||||
| /.ocr_image | [图片OCR] |
|
||||
| /.ocr_image | [图片 OCR] |
|
||||
| /get_group_system_msg | [获取群系统消息] |
|
||||
| /get_group_file_system_info | [获取群文件系统信息] |
|
||||
| /get_group_root_files | [获取群根目录文件列表] |
|
||||
@ -162,7 +203,7 @@
|
||||
[获取合并转发内容]: docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E5%86%85%E5%AE%B9
|
||||
[发送合并转发(群)]: docs/cqhttp.md#%E5%8F%91%E9%80%81%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E7%BE%A4
|
||||
[获取中文分词]: docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D
|
||||
[图片OCR]: docs/cqhttp.md#%E5%9B%BE%E7%89%87ocr
|
||||
[图片 ocr]: docs/cqhttp.md#%E5%9B%BE%E7%89%87ocr
|
||||
[获取群系统消息]: docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E7%BE%A4%E7%B3%BB%E7%BB%9F%E6%B6%88%E6%81%AF
|
||||
[获取群文件系统信息]: docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E4%BF%A1%E6%81%AF
|
||||
[获取群根目录文件列表]: docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%A0%B9%E7%9B%AE%E5%BD%95%E6%96%87%E4%BB%B6%E5%88%97%E8%A1%A8
|
||||
@ -175,7 +216,8 @@
|
||||
<details>
|
||||
<summary>已实现Event</summary>
|
||||
|
||||
##### 符合Onebot标准的Event(部分Event比Onebot标准多上报几个字段,不影响使用)
|
||||
#### 符合 Onebot 标准的 Event(部分 Event 比 Onebot 标准多上报几个字段,不影响使用)
|
||||
|
||||
| 事件类型 | Event |
|
||||
| -------- | ---------------- |
|
||||
| 消息事件 | [私聊信息] |
|
||||
@ -210,8 +252,9 @@
|
||||
[加好友请求]: https://github.com/howmanybots/onebot/blob/master/v11/specs/event/request.md#%E5%8A%A0%E5%A5%BD%E5%8F%8B%E8%AF%B7%E6%B1%82
|
||||
[加群请求/邀请]: https://github.com/howmanybots/onebot/blob/master/v11/specs/event/request.md#%E5%8A%A0%E7%BE%A4%E8%AF%B7%E6%B1%82%E9%82%80%E8%AF%B7
|
||||
|
||||
##### 拓展Event
|
||||
| 事件类型 | 拓展Event |
|
||||
#### 拓展 Event
|
||||
|
||||
| 事件类型 | 拓展 Event |
|
||||
| -------- | ---------------- |
|
||||
| 通知事件 | [好友戳一戳] |
|
||||
| 通知事件 | [群成员名片更新] |
|
||||
@ -223,16 +266,17 @@
|
||||
|
||||
</details>
|
||||
|
||||
# 关于ISSUE
|
||||
## 关于 ISSUE
|
||||
|
||||
以下ISSUE会被直接关闭
|
||||
- 提交BUG不使用Template
|
||||
以下 ISSUE 会被直接关闭
|
||||
|
||||
- 提交 BUG 不使用 Template
|
||||
- 询问已知问题
|
||||
- 提问找不到重点
|
||||
- 重复提问
|
||||
|
||||
> 请注意, 开发者并没有义务回复您的问题. 您应该具备基本的提问技巧。
|
||||
|
||||
# 性能
|
||||
## 性能
|
||||
|
||||
在关闭数据库的情况下, 加载25个好友128个群运行24小时后内存使用为10MB左右. 开启数据库后内存使用将根据消息量增加10-20MB, 如果系统内存小于128M建议关闭数据库使用.
|
||||
在关闭数据库的情况下, 加载 25 个好友 128 个群运行 24 小时后内存使用为 10MB 左右. 开启数据库后内存使用将根据消息量增加 10-20MB, 如果系统内存小于 128M 建议关闭数据库使用.
|
||||
|
Loading…
x
Reference in New Issue
Block a user