更新README.md

This commit is contained in:
ClovertaTheTrilobita 2025-01-16 11:49:24 +08:00
parent 1c9d6107ac
commit 0d5f44a922

View file

@ -51,6 +51,8 @@ conda create --name chatbot python=3.11
或者将上述 *chatbot* 更换为你喜欢的名字。
**🚫注意:**机器人**不**支持<img alt="Static Badge" src="https://img.shields.io/badge/Python-3.13/+-blue">的发行版,推荐使用<img alt="Static Badge" src="https://img.shields.io/badge/Python-3.11%2F3.12-blue">
此机器人运行所需依赖已全部打包至***requirements.txt***,您只需回到项目根目录
@ -191,3 +193,62 @@ python bot.by
### 🎈四、更多功能
#### ☄️待办、摸一摸、今日运势的初始化
机器人中已经配置好数据库初始化的脚本。若您是第一次启动机器人。会在项目根目录下自动创建<b><i>chat_bot.db</i></b>(数据库文件)
chat_bot.db中包括六张表
```sql
--摸一摸文本数据
qr_touch
--摸一摸日志
qr_touch_log
--今日运势文本数据
qr_fortune
--今日运势日志,存储该用户是否已经查询过运势
qr_fortune_log
--用户列表
user_list
--用户待办表
user_todo_list
```
初始化相关脚本存放在 <b><i>/src/my_sqlite/data_init</i></b> 目录下。
每次启动机器人,程序会自动检查上述六张表是否存在,有表缺失则会在数据库中自动创建对应的表。
对已存在的表不做处理。
#### ⛅从图床发送图片
##### 介绍:
机器人支持[<b>SMMS图床</b>](https://sm.ms/)、[<b>聚合图床</b>](https://www.superbed.cn/)、从**本地**发送图片。
获取图片的方法统一编写在[<B>src/image/get_image.py</B>](src/image/get_image.py)下。
##### 使用:
首先找到[<b>src/image/config/image.yaml</b>](src/image/config/image.yaml)
```yaml
image:
app_id: "<KEY>"
image_local_qq_image_path: "src/image/qq_image"
image_local_path: "src/image/MaoYuNa"
#SMMS图床相关配置
smms_token: "<KEY>" # sm.ms图床的token
smms_image_upload_history: "https://sm.ms/api/v2/upload_history" # sm.ms图床获取上传图片历史API地址
#聚合图床相关配置
ju_he_token: "<KEY>" # 聚合图床的token
ju_he_image_list: "https://api.superbed.cn/timeline" # 聚合图床获取上传图片历史API地址
```
将你的机器人app_idsmms图床Token和聚合图床Token替换上述<i>\<KEY></i>(可以根据自身需求选填)
之后在[<B>get_image.py</B>](src/image/get_image.py)中找到对应的方法,根据自身需求调用。