-
真寻BOT的使用方法
+
{{data.bot_name}}BOT的使用方法
可以通过'帮助[功能名称或功能ID]'来获取对应功能的使用方法

diff --git a/zhenxun/builtin_plugins/auto_update/_data_source.py b/zhenxun/builtin_plugins/auto_update/_data_source.py
index be5e3b23..57ef4732 100644
--- a/zhenxun/builtin_plugins/auto_update/_data_source.py
+++ b/zhenxun/builtin_plugins/auto_update/_data_source.py
@@ -1,4 +1,5 @@
import os
+from pathlib import Path
import shutil
import tarfile
import zipfile
@@ -98,6 +99,8 @@ def _file_handle(latest_version: str | None):
shutil.move(_req_file, REQ_TXT_FILE)
for folder in REPLACE_FOLDERS:
"""移动指定文件夹"""
+ if isinstance(folder, list):
+ folder = Path(*folder)
_dir = BASE_PATH / folder
_backup_dir = BACKUP_PATH / folder
if _backup_dir.exists():
@@ -109,6 +112,8 @@ def _file_handle(latest_version: str | None):
else:
logger.warning(f"文件夹 {_dir} 不存在,跳过删除", "检查更新")
for folder in REPLACE_FOLDERS:
+ if isinstance(folder, list):
+ folder = Path(*folder)
src_folder_path = extract_path / folder
dest_folder_path = target_path / folder
if src_folder_path.exists():
diff --git a/zhenxun/builtin_plugins/auto_update/config.py b/zhenxun/builtin_plugins/auto_update/config.py
index b4c61345..53d4d7f7 100644
--- a/zhenxun/builtin_plugins/auto_update/config.py
+++ b/zhenxun/builtin_plugins/auto_update/config.py
@@ -29,6 +29,7 @@ DOWNLOAD_ZIP_FILE = TMP_PATH / DOWNLOAD_ZIP_FILE_STRING
REPLACE_FOLDERS = [
"builtin_plugins",
+ ["resources", "template"],
"services",
"utils",
"models",
diff --git a/zhenxun/builtin_plugins/help/zhenxun_help.py b/zhenxun/builtin_plugins/help/zhenxun_help.py
index a08b49e3..2936bc77 100644
--- a/zhenxun/builtin_plugins/help/zhenxun_help.py
+++ b/zhenxun/builtin_plugins/help/zhenxun_help.py
@@ -5,6 +5,7 @@ from zhenxun.utils.enum import BlockType
from zhenxun.utils.platform import PlatformUtils
from zhenxun.models.plugin_info import PluginInfo
from zhenxun.configs.path_config import TEMPLATE_PATH
+from zhenxun.configs.config import BotConfig
from zhenxun.models.group_console import GroupConsole
from ._utils import classify_plugin
@@ -132,6 +133,7 @@ async def build_zhenxun_image(
"data": {
"plugin_list": plugin_list,
"ava": PlatformUtils.get_user_avatar_url(bot_id, platform),
+ "bot_name": BotConfig.self_nickname,
}
},
pages={
diff --git a/zhenxun/builtin_plugins/sign_in/goods_register.py b/zhenxun/builtin_plugins/sign_in/goods_register.py
index a280d9a7..13058e46 100644
--- a/zhenxun/builtin_plugins/sign_in/goods_register.py
+++ b/zhenxun/builtin_plugins/sign_in/goods_register.py
@@ -52,7 +52,7 @@ async def _(session: EventSession, user_id: int, prob: float):
@shop_register(
name="测试道具A",
price=99,
- des="随便侧而出",
+ des="随便测而出",
load_status=False,
icon="sword.png",
)