refactor: system类命令

This commit is contained in:
Rock Chin
2023-03-30 03:38:33 +00:00
parent 4055d3542b
commit 2069ba6836
7 changed files with 171 additions and 1 deletions

View File

@@ -156,7 +156,7 @@ class AbstractCommandNode:
@classmethod
def help(cls) -> str:
"""获取指令帮助信息"""
return '指令: {}\n描述: {}\n用法: {}\n别名: {}\n权限: {}'.format(
return '指令: {}\n描述: {}\n用法: \n{}\n别名: {}\n权限: {}'.format(
cls.name,
cls.description,
cls.usage,
@@ -297,6 +297,8 @@ def register_all():
# 排除不处于pkg.qqbot.cmds中的包
if not module.__name__.startswith('pkg.qqbot.cmds'):
return
logging.debug('walk: {}, path: {}'.format(module.__name__, module.__path__))
for item in pkgutil.iter_modules(module.__path__):
if item.name.startswith('__'):
continue