refactor: 重构插件系统

This commit is contained in:
RockChinQ
2024-01-29 21:22:27 +08:00
parent b730f17eb6
commit 6cc4688660
53 changed files with 1307 additions and 1993 deletions

View File

@@ -3,7 +3,6 @@ from __future__ import annotations
import typing
from .. import operator, cmdmgr, entities, errors
from ...utils import updater
@operator.operator_class(
@@ -17,10 +16,10 @@ class VersionCommand(operator.CommandOperator):
self,
context: entities.ExecuteContext
) -> typing.AsyncGenerator[entities.CommandReturn, None]:
reply_str = f"当前版本: \n{updater.get_current_version_info()}"
reply_str = f"当前版本: \n{await self.ap.ver_mgr.get_current_version_info()}"
try:
if updater.is_new_version_available():
if await self.ap.ver_mgr.is_new_version_available():
reply_str += "\n\n有新版本可用, 使用 !update 更新"
except:
pass