mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
docs: update readme
This commit is contained in:
164
README.md
164
README.md
@@ -1,175 +1,25 @@
|
|||||||
|
|
||||||
# LLOneBot API
|
# LLOneBot API
|
||||||
LiteLoaderQQNT的OneBot11协议插件
|
LiteLoaderQQNT插件,使你的NTQQ支持OneBot11协议进行QQ机器人开发
|
||||||
|
|
||||||
TG群:<https://t.me/+nLZEnpne-pQ1OWFl>
|
TG群:<https://t.me/+nLZEnpne-pQ1OWFl>
|
||||||
|
|
||||||
*注意:本文档对应的是 LiteLoader 1.0.0及以上版本,如果你使用的是旧版本请切换到本项目v1分支查看文档*
|
|
||||||
|
|
||||||
*V3之后不再需要LLAPI*
|
|
||||||
|
|
||||||
## 安装方法
|
## 安装方法
|
||||||
|
|
||||||
### 通用手动安装方法
|
见 <https://llonebot.github.io/zh-CN/guide/getting-started>
|
||||||
|
|
||||||
1.安装[LiteLoaderQQNT](https://liteloaderqqnt.github.io/guide/install.html)
|
## 设置界面
|
||||||
|
|
||||||
2.安装本项目插件[LLOneBot](https://github.com/linyuchen/LiteLoaderQQNT-OneBotApi/releases/), 注意本插件2.0以下的版本不支持LiteLoader 1.0.0及以上版本
|

|
||||||
|
|
||||||
*关于插件的安装方法: 下载后解压复制到插件目录*
|
## 调用示例
|
||||||
|
|
||||||
*插件目录:`LiteLoaderQQNT/plugins`*
|
|
||||||
|
|
||||||
安装后的目录结构如下
|
|
||||||
```
|
|
||||||
├── plugins
|
|
||||||
│ ├── LLOneBot
|
|
||||||
│ │ └── main/
|
|
||||||
│ │ └── preload/
|
|
||||||
│ │ └── renderer/
|
|
||||||
│ │ └── manifest.json
|
|
||||||
│ │ └── node_modules/...
|
|
||||||
```
|
|
||||||
|
|
||||||
### Linux 容器化快速安装
|
|
||||||
|
|
||||||
执行以下任意脚本,按照提示设置NoVnc密码,即可运行,脚本问题与异常参考 [llonebot-docker](https://github.com/MliKiowa/llonebot-docker) 项目。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl https://cdn.jsdelivr.net/gh/LLOneBot/llonebot-docker/fastboot.sh -o fastboot.sh & chmod +x fastboot.sh & sudo sh fastboot.sh
|
|
||||||
```
|
|
||||||
```bash
|
|
||||||
wget -O fastboot.sh https://cdn.jsdelivr.net/gh/LLOneBot/llonebot-docker/fastboot.sh & chmod +x fastboot.sh & sudo sh fastboot.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### 使用termux安装
|
|
||||||
|
|
||||||
具体安装过程与教程,参考 [llonebot-termux](https://github.com/LLOneBot/llonebot-termux) 项目。
|
|
||||||
|
|
||||||
## 支持的功能
|
|
||||||
|
|
||||||
目前支持的协议
|
|
||||||
- [x] http调用api
|
|
||||||
- [x] http事件上报,不支持快捷回复等快捷操作
|
|
||||||
- [x] 正向websocket
|
|
||||||
- [x] 反向websocket
|
|
||||||
|
|
||||||
主要功能:
|
|
||||||
- [x] 发送好友消息
|
|
||||||
- [x] 发送群消息
|
|
||||||
- [x] 获取好友列表
|
|
||||||
- [x] 获取群列表
|
|
||||||
- [x] 获取群成员列表
|
|
||||||
- [x] 撤回消息
|
|
||||||
- [x] 处理添加好友请求
|
|
||||||
- [x] 处理加群请求
|
|
||||||
- [x] 退群
|
|
||||||
- [x] 上报好友消息
|
|
||||||
- [x] 上报添加好友请求
|
|
||||||
- [x] 上报群消息
|
|
||||||
- [x] 上报好友、群消息撤回
|
|
||||||
- [x] 上报加群请求
|
|
||||||
- [x] 上报群员人数变动(尚不支持识别群员人数变动原因)
|
|
||||||
- [x] 设置群管理员
|
|
||||||
- [x] 群禁言/全体禁言
|
|
||||||
- [x] 群踢人
|
|
||||||
- [x] 群改群成员名片
|
|
||||||
- [x] 修改群名
|
|
||||||
|
|
||||||
消息格式支持:
|
|
||||||
- [x] cq码
|
|
||||||
- [x] 文字
|
|
||||||
- [x] 表情
|
|
||||||
- [x] 图片
|
|
||||||
- [x] 引用消息
|
|
||||||
- [x] @群成员
|
|
||||||
- [x] 语音(支持mp3、wav等多种音频格式直接发送)
|
|
||||||
- [x] json消息(只上报)
|
|
||||||
- [x] 转发消息记录(目前只能发不能收)
|
|
||||||
- [x] 视频(上报时暂时只有个空的file)
|
|
||||||
- [x] 文件(上报时暂时只有个空的file), type为file, data为{file: uri}, 发送时uri支持http://, file://, base64://
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"data": {
|
|
||||||
"file": "file:///D:/1.txt",
|
|
||||||
"name": "自定义显示的文件名" // 此字段不是必须的
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
- [ ] 发送音乐卡片
|
|
||||||
- [ ] 红包(没有计划支持)
|
|
||||||
- [ ] xml (没有计划支持)
|
|
||||||
|
|
||||||
## 示例
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 一些坑
|
## 支持的 api 和功能详情
|
||||||
|
|
||||||
<details>
|
见 <https://llonebot.github.io/zh-CN/develop/api>
|
||||||
<summary>下载了插件但是没有看到在NTQQ中生效</summary>
|
|
||||||
<br/>
|
|
||||||
检查是否下载的是插件release的版本,如果是源码的话需要自行编译。依然不生效请查阅<a href="https://liteloaderqqnt.github.io/guide/plugins.html">LiteLoaderQQNT的文档</a>
|
|
||||||
</details>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>调用接口报404</summary>
|
|
||||||
<br/>
|
|
||||||
目前没有支持全部的onebot规范接口,请检查是否调用了不支持的接口
|
|
||||||
-
|
|
||||||
</details>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>发送不了图片和语音</summary>
|
|
||||||
<br/>
|
|
||||||
检查当前操作用户是否有LiteLoaderQQNT/data/LLOneBot的写入权限,如Windows把QQ上安装到C盘有可能会出现无权限导致发送失败
|
|
||||||
</details>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>QQ变得很卡</summary>
|
|
||||||
<br/>
|
|
||||||
这是你的群特别多导致的,因为启动后会批量获取群成员列表,获取完之后就正常了
|
|
||||||
</details>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
## 支持的onebot v11 api:
|
|
||||||
- [x] get_login_info
|
|
||||||
- [x] send_msg
|
|
||||||
- [x] send_group_msg
|
|
||||||
- [x] send_private_msg
|
|
||||||
- [x] delete_msg
|
|
||||||
- [x] get_group_list
|
|
||||||
- [x] get_group_info
|
|
||||||
- [x] get_group_member_list
|
|
||||||
- [x] get_group_member_info
|
|
||||||
- [x] get_friend_list
|
|
||||||
- [x] set_friend_add_request
|
|
||||||
- [x] get_msg
|
|
||||||
- [x] send_like
|
|
||||||
- [x] set_group_add_request
|
|
||||||
- [x] set_group_leave
|
|
||||||
- [x] set_group_kick
|
|
||||||
- [x] set_group_ban
|
|
||||||
- [x] set_group_whole_ban
|
|
||||||
- [x] set_group_kick
|
|
||||||
- [x] set_group_admin
|
|
||||||
- [x] set_group_card
|
|
||||||
- [x] set_group_name
|
|
||||||
- [x] get_version_info
|
|
||||||
- [x] get_status
|
|
||||||
- [x] can_send_image
|
|
||||||
- [x] can_send_record
|
|
||||||
- [x] get_image
|
|
||||||
- [x] get_record
|
|
||||||
|
|
||||||
### 支持的go-cqhtp api:
|
|
||||||
- [x] send_private_forward_msg
|
|
||||||
- [x] send_group_forward_msg
|
|
||||||
- [x] get_stranger_info
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- [x] 重构摆脱LLAPI,目前调用LLAPI只能在renderer进程调用,需重构成在main进程调用
|
- [x] 重构摆脱LLAPI,目前调用LLAPI只能在renderer进程调用,需重构成在main进程调用
|
||||||
|
BIN
doc/image/setting.png
Normal file
BIN
doc/image/setting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user