forked from bot/app
✨ 全新资源包结构
This commit is contained in:
parent
f69844717f
commit
93e1a0ff77
3
liteyuki/resources/vanilla_language/metadata.yml
Normal file
3
liteyuki/resources/vanilla_language/metadata.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name: 轻雪语言资源包
|
||||||
|
description: 全局的语言资源包,不可卸载
|
||||||
|
version: 1.0.0
|
@ -1,3 +1,3 @@
|
|||||||
name: 轻雪资源包
|
name: 轻雪原版资源包
|
||||||
description: 轻雪内置资源包,不可卸载
|
description: 轻雪内置资源包,不可卸载
|
||||||
version: 1.0.0
|
version: 1.0.0
|
@ -7,7 +7,7 @@ import time
|
|||||||
import nonebot
|
import nonebot
|
||||||
|
|
||||||
__NAME__ = "LiteyukiBot"
|
__NAME__ = "LiteyukiBot"
|
||||||
__VERSION__ = "6.2.8" # 60201
|
__VERSION__ = "6.3.0" # 60201
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -112,10 +112,12 @@ def load_resources():
|
|||||||
shutil.rmtree(temp_resource_root)
|
shutil.rmtree(temp_resource_root)
|
||||||
os.makedirs(temp_resource_root, exist_ok=True)
|
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"):
|
if not os.path.exists("resources"):
|
||||||
os.makedirs("resources", exist_ok=True)
|
os.makedirs("resources", exist_ok=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user