From 6496b6e463e1ed8e7a9d1c0ecb94d3db9267c099 Mon Sep 17 00:00:00 2001 From: snowy Date: Sat, 1 Jun 2024 15:01:04 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=AF=B9lyfunction=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E6=B7=BB=E5=8A=A0=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/childrensdaybak.md | 86 +++++++++++++++++++++++++ liteyuki/plugins/liteyuki_status/api.py | 4 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 docs/childrensdaybak.md diff --git a/docs/childrensdaybak.md b/docs/childrensdaybak.md new file mode 100644 index 00000000..69a2fa99 --- /dev/null +++ b/docs/childrensdaybak.md @@ -0,0 +1,86 @@ +--- +home: true +icon: home +title: 首页 +heroImage: https://cdn.liteyuki.icu/static/img/logo.png +bgImage: +bgImageDark: +bgImageStyle: + background-attachment: fixed +heroText: LiteyukiBot +tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人 + +actions: + - text: 快速部署 + icon: lightbulb + link: ./deployment/install.html + type: primary + + - text: 使用手册 + icon: book + link: ./usage/basic_command.html + +highlights: + + - header: 简洁至上 + image: /assets/image/layout.svg + bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg + bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg + bgImageStyle: + background-repeat: repeat + background-size: initial + features: + - title: 基于Nonebot2 + icon: robot + details: 拥有良好的生态支持 + link: https://nonebot.dev/ + + - title: 便捷插件管理 + icon: plug + details: 使用包管理器,无需命令行操作即可安装/卸载插件 + + - title: 人性化交互 + icon: mouse-pointer + details: 新的点击交互模式,拒绝手打指令 + + - title: 主题支持 + icon: paint-brush + details: 使用资源包对外观进行完全自定义 + link: https://bot.liteyuki.icu/usage/resource_pack.html + + - title: 国际化 + icon: globe + details: 通过资源包支持多种语言 + link: https://baike.baidu.com/item/i18n/6771940 + + - title: 简易配置 + icon: cog + details: 无需繁琐前期过程,开箱即用 + link: https://bot.liteyuki.icu/deployment/config.html + + - title: 高性能 + icon: tachometer-alt + details: 500个插件,3s内启动 + + - title: 滚动更新 + icon: cloud-download + details: 让你的机器人保持最新提交 + + - title: 开源 + icon: code + details: 项目遵循MIT协议开源,欢迎各位的贡献 + + - header: 快速部署 + image: /assets/image/box.svg + bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg + bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg + highlights: + - title: 安装 Git 和 Python3.10+ + - title: 使用 git clone https://github.com/snowykami/LiteyukiBot 以克隆项目至本地。 + details: 如果无法连接到GitHub,可以使用 git clone https://gitee.com/snowykami/LiteyukiBot。 + - title: 使用 cd LiteyukiBot 切换到项目目录。 + - title: 使用 pip install -r requirements.txt 安装项目依赖。 + details: 如果你有多个 Python 环境,请使用 pythonx -m pip install -r requirements.txt。 + - title: 使用 python main.py 启动项目。 +copyright: © 2021-2024 SnowyKami All Rights Reserved +--- diff --git a/liteyuki/plugins/liteyuki_status/api.py b/liteyuki/plugins/liteyuki_status/api.py index 060e652e..f2689d33 100644 --- a/liteyuki/plugins/liteyuki_status/api.py +++ b/liteyuki/plugins/liteyuki_status/api.py @@ -19,6 +19,8 @@ from .counter_for_satori import satori_counter require("nonebot_plugin_apscheduler") from nonebot_plugin_apscheduler import scheduler +commit_hash = None + protocol_names = { 0: "iPad", 1: "Android Phone", @@ -263,7 +265,7 @@ async def get_liteyuki_data() -> dict: temp_data: TempConfig = common_db.where_one(TempConfig(), default=TempConfig()) result = { "name": list(get_config("nickname", [__NAME__]))[0], - "version": __VERSION__, + "version": f"{__VERSION__}({commit_hash})", "plugins": len(nonebot.get_loaded_plugins()), "resources": len(get_loaded_resource_packs()), "nonebot": f"{nonebot.__version__}",