docs: 修改README.md

This commit is contained in:
snowy 2024-02-29 01:48:12 +08:00
parent 608aa93dd1
commit ffa5a8b9e2

View File

@ -15,42 +15,64 @@
- 基于[Nonebot2]("https://github.com/nonebot/nonebot2"),有良好的生态支持 - 基于[Nonebot2]("https://github.com/nonebot/nonebot2"),有良好的生态支持
- 集成了上一代轻雪的优点和~~缺点~~ - 集成了上一代轻雪的优点和~~缺点~~
- 支持Telegram/Github通信,后续会支持更多的平台 - 支持一切Onebot标准通信,后续会支持更多的平台
## 手动安装和部署 ## 手动安装和部署
1.安装Git使用命令`git clone https://github.com/snowykami/LiteyukiBot` 克隆项目至本地 1. 安装`Git`和`Python3.10+`后,使用命令`git clone https://github.com/snowykami/LiteyukiBot` 克隆项目至本地。
一定要安装GitBot自带功能需要git支持
2. 切换到轻雪目录,使用`pip install -r requirements.txt`安装依赖
2.切换到轻雪目录,使用`pip install -r r.txt` 3. `python main.py`启动!
3.`python main.py`!启动! ## 一键部署脚本(复制到本地保存执行)
#### 提前部署好`Python3.10+`环境和`Git`环境
#### Windows
## 一键部署脚本
### Windows
```bash ```bash
chcp 65001 chcp 65001
git clone https://github.com/snowykami/LiteyukiBot git clone https://github.com/snowykami/LiteyukiBot
cd LiteyukiBot cd LiteyukiBot
pip install -r requirements.txt pip install -r requirements.txt
echo python main.py > start.bat echo python3 main.py > start.bat
echo Install finished! Please run start.bat to start the bot! echo Install finished! Please run start.bat to start the bot!
``` ```
### Linux
#### Linux
```bash ```bash
git clone https://github.com/snowykami/LiteyukiBot git clone https://github.com/snowykami/LiteyukiBot
cd LiteyukiBot cd LiteyukiBot
pip install -r requirements.txt pip install -r requirements.txt
echo python main.py > start.sh echo python3 main.py > start.sh
chmod +x start.sh chmod +x start.sh
echo Install finished! Please run start.sh to start the bot! echo Install finished! Please run start.sh to start the bot!
``` ```
## 注意事项 ## 注意事项
1.尽可能不要去动配置文件通过与bot交互进行配置即可若仍然想自定义配置请在`config.yml`中修改 - 尽可能不要去动配置文件通过与bot交互进行配置即可若仍然想自定义配置请在`config.yml`中修改
2.Bot会自动检测新版本若出现新版本可用`git pull`命令更新 - 首次启动会提醒用户注册超级用户
- Bot会自动检测新版本若出现新版本可用`git pull`命令更新
### Onebot实现端配置
| 字段 | 参考值 | 说明 |
|----|-------------------------------|-------------------------|
| 协议 | 反向WebSocket | 轻雪使用反向ws协议进行通信即轻雪作为服务端 |
| 地址 | ws://`host`:`port`/onebot/v11 | 地址取决于配置文件,默认为`20216`端口 |
### 推荐方案
1. 使用`Lagrange.Core``Lagrange.Core`支持多种协议
2. 云崽的`icqq-plugin`和`ws-plugin`进行通信
3. `Go-cqhttp`(目前已经半死不活了)
4. 人工实现的`Onebot`协议自己整一个WebSocket客户端看着QQ的消息然后给轻雪传输数据
请先自行查阅文档若有困难请联系相关开发者而不是Liteyuki的开发者
## 鸣谢 ## 鸣谢
- html转图片使用的[kexue-z](https://github.com/kexue-z)的[nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)插件的部分代码 - html转图片使用的[kexue-z](https://github.com/kexue-z)的[nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)插件的部分代码