1
0
forked from bot/app

全新资源包结构

This commit is contained in:
远野千束 2024-04-26 15:11:31 +08:00
parent f69844717f
commit 93e1a0ff77
17 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,3 @@
name: 轻雪语言资源包
description: 全局的语言资源包,不可卸载
version: 1.0.0

View File

@ -1,3 +1,3 @@
name: 轻雪资源包
name: 轻雪原版资源包
description: 轻雪内置资源包,不可卸载
version: 1.0.0

View File

@ -7,7 +7,7 @@ import time
import nonebot
__NAME__ = "LiteyukiBot"
__VERSION__ = "6.2.8" # 60201
__VERSION__ = "6.3.0" # 60201
import requests

View File

@ -112,10 +112,12 @@ def load_resources():
shutil.rmtree(temp_resource_root)
os.makedirs(temp_resource_root, exist_ok=True)
standard_resource_path = "liteyuki/resources"
load_resource_from_dir(standard_resource_path)
# 加载其他资源包
# 加载内置资源
standard_resources_path = "liteyuki/resources"
for resource_dir in os.listdir(standard_resources_path):
load_resource_from_dir(os.path.join(standard_resources_path, resource_dir))
# 加载其他资源包
if not os.path.exists("resources"):
os.makedirs("resources", exist_ok=True)