feat: Python接口的MAA更新器

This commit is contained in:
SarContDeli
2023-02-02 21:36:32 +08:00
parent 3015546f30
commit bc48125ff8
2 changed files with 274 additions and 10 deletions

View File

@@ -2,7 +2,7 @@ import json
import pathlib
import time
from asst import InstanceOptionType, Asst, Message
from asst import InstanceOptionType, Asst, Message, Updater, Version
@Asst.CallBackType
@@ -18,6 +18,9 @@ if __name__ == "__main__":
# 请设置为存放 dll 文件及资源的路径
path = pathlib.Path.cwd().parent
# 设置更新器的路径和目标版本并更新
Updater(path, Version.Stable).update()
# 外服需要再额外传入增量资源路径,例如
# incremental_path=path / 'resource' / 'global' / 'YoStarEN'
Asst.load(path=path)