fix commands

This commit is contained in:
jxxghp
2023-06-09 11:26:53 +08:00
parent 50d71621d7
commit 01428e9f8f
25 changed files with 228 additions and 202 deletions

View File

@@ -39,6 +39,14 @@ class ModuleManager(metaclass=Singleton):
self._running_modules[module_id].init_module()
logger.info(f"Moudle Loaded{module_id}")
def stop(self):
"""
停止所有模块
"""
for _, module in self._running_modules.items():
if hasattr(module, "stop"):
module.stop()
def get_modules(self, method: str) -> Generator:
"""
获取模块列表