docs: 优化排版

This commit is contained in:
snowy 2024-03-26 23:34:29 +08:00
parent 423ba84908
commit 3932366955
3 changed files with 17 additions and 13 deletions

View File

@ -1,6 +1,8 @@
<div align="center"><img src="https://cdn.liteyuki.icu/static/img/logo.png" style="width: 60%; margin-top:10%;" alt="a"></div>
<div align=center><h2><font color="#d0e9ff">轻雪</font><font color="#a2d8f4">6.2</font></h2></div>
<div align=center><h4>轻量,高效,易于扩展</h4></div>
<div style="text-align: center;">
<img src="https://cdn.liteyuki.icu/static/img/logo.png" style="align-content: center; width: 50%; margin-top:10%;" alt="a">
<h2> <span style="color: #a2d8f4">轻雪</span> <span style="color: #d0e9ff">6.2</span></h2>
<h4> <span style="color: #a2d8f4"> 轻量,高效,易于扩展</span></h4>
</div>
- 基于[Nonebot2](https://github.com/nonebot/nonebot2),有良好的生态支持
- 开箱即用,无需复杂配置
@ -10,8 +12,8 @@
## 1.安装和部署
1. 安装`Git`和`Python3.10+`
2. 克隆项目`git clone https://github.com/snowykami/LiteyukiBot`
1. 安装 `Git` `Python3.10+` 环境
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot` (无法连接可以用`https://gitee.com/snowykami/LiteyukiBot`)
3. 切换目录`cd LiteyukiBot`
4. 安装依赖`pip install -r requirements.txt`(如果多个Python环境请指定后安装`pythonx -m pip install -r requirements.txt`)
5. 启动`python main.py`
@ -47,7 +49,7 @@ custom_config_1: "custom_value1"
| 字段 | 参考值 | 说明 |
|-------------|--------------------------|----------------------------------|
| 协议 | 反向WebSocket | 推荐使用反向ws协议进行通信即轻雪作为服务端 |
| 协议 | 反向WebSocket | 推荐使用反向ws协议进行通信即轻雪作为服务端 |
| 地址 | ws://`addrss`/onebot/v11 | 地址取决于配置文件,本机默认为`127.0.0.1:20216` |
| AccessToken | `""` | 如果你给轻雪配置了`AccessToken`,请在此填写相同的值 |
@ -83,7 +85,8 @@ custom_config_1: "custom_value1"
## 4.用户协议
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
2. 你可以选择开启`auto_report`(默认开启)轻雪会收集运行环境的设备信息通过安全的方式传输到轻雪服务器用于统计运行时的设备信息帮助我们改进轻雪收集的数据包括但不限于CPU内存插件信息异常信息会话负载(不含隐私部分)
2. 你可以选择开启`auto_report`(默认开启)
轻雪会收集运行环境的设备信息通过安全的方式传输到轻雪服务器用于统计运行时的设备信息帮助我们改进轻雪收集的数据包括但不限于CPU内存插件信息异常信息会话负载(不含隐私部分)
3. 本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性
## 5.鸣谢

View File

@ -4,7 +4,7 @@ import nonebot.plugin
from nonebot import require
from nonebot.exception import FinishedException, IgnoredException
from nonebot.internal.adapter import Event
from nonebot.internal.matcher import Matcher
from nonebot.internal.matcher import Matcher, current_matcher
from nonebot.adapters import Bot
from nonebot.message import run_preprocessor
from nonebot.permission import SUPERUSER
@ -236,7 +236,8 @@ async def pre_handle(event: Event, matcher: Matcher):
raise IgnoredException("Plugin disabled in session")
# @Bot.on_calling_api
# async def _(bot: Bot, api: str, data: dict[str, any]):
# # TODO 插件启用/停用检查hook
# nonebot.logger.info(f"Plugin Callapi: {api}: {data}")
@Bot.on_calling_api
async def _(bot: Bot, api: str, data: dict[str, any]):
# TODO 插件启用/停用检查hook
plugin = current_plugin
nonebot.logger.info(f"Plugin Callapi: {api}: {data}")

View File

@ -1,7 +1,7 @@
language.name=简体中文(轻雪版)
log.debug=调试中
log.info=信息
log.info=信息
log.warning=有问题
log.error=出错辣
log.success=成功啦