From 0d5f44a922a3a84c9c76f8b2c6ec505a97c5b9ab Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 16 Jan 2025 11:49:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/README.md b/README.md index 0378396..7b76a33 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ conda create --name chatbot python=3.11 或者将上述 *chatbot* 更换为你喜欢的名字。 +**🚫注意:**机器人**不**支持Static Badge的发行版,推荐使用Static Badge + 此机器人运行所需依赖已全部打包至***requirements.txt***,您只需回到项目根目录 @@ -191,3 +193,62 @@ python bot.by ### 🎈四、更多功能 +#### ☄️待办、摸一摸、今日运势的初始化 + +机器人中已经配置好数据库初始化的脚本。若您是第一次启动机器人。会在项目根目录下自动创建chat_bot.db(数据库文件) + +chat_bot.db中包括六张表: + +```sql +--摸一摸文本数据 +qr_touch +--摸一摸日志 +qr_touch_log + +--今日运势文本数据 +qr_fortune +--今日运势日志,存储该用户是否已经查询过运势 +qr_fortune_log + +--用户列表 +user_list +--用户待办表 +user_todo_list +``` + +初始化相关脚本存放在 /src/my_sqlite/data_init 目录下。 + +每次启动机器人,程序会自动检查上述六张表是否存在,有表缺失则会在数据库中自动创建对应的表。 + +对已存在的表不做处理。 + + + +#### ⛅从图床发送图片 + +##### 介绍: + +机器人支持[SMMS图床](https://sm.ms/)、[聚合图床](https://www.superbed.cn/)、从**本地**发送图片。 + +获取图片的方法统一编写在[src/image/get_image.py](src/image/get_image.py)下。 + +##### 使用: + +首先找到[src/image/config/image.yaml](src/image/config/image.yaml) + +```yaml +image: + app_id: "" + image_local_qq_image_path: "src/image/qq_image" + image_local_path: "src/image/MaoYuNa" + #SMMS图床相关配置 + smms_token: "" # sm.ms图床的token + smms_image_upload_history: "https://sm.ms/api/v2/upload_history" # sm.ms图床获取上传图片历史API地址 + #聚合图床相关配置 + ju_he_token: "" # 聚合图床的token + ju_he_image_list: "https://api.superbed.cn/timeline" # 聚合图床获取上传图片历史API地址 +``` + +将你的机器人app_id,smms图床Token和聚合图床Token替换上述\(可以根据自身需求选填) + +之后在[get_image.py](src/image/get_image.py)中找到对应的方法,根据自身需求调用。