diff options
Diffstat (limited to 'ATRI/plugins/help')
-rw-r--r-- | ATRI/plugins/help/__init__.py | 2 | ||||
-rw-r--r-- | ATRI/plugins/help/data_source.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ATRI/plugins/help/__init__.py b/ATRI/plugins/help/__init__.py index c6f915e..a9663eb 100644 --- a/ATRI/plugins/help/__init__.py +++ b/ATRI/plugins/help/__init__.py @@ -36,7 +36,7 @@ async def _ready_service_info(event: MessageEvent): try: service = msg[1] - except: + except Exception: service = "idk" try: diff --git a/ATRI/plugins/help/data_source.py b/ATRI/plugins/help/data_source.py index d926417..2573bf4 100644 --- a/ATRI/plugins/help/data_source.py +++ b/ATRI/plugins/help/data_source.py @@ -7,7 +7,6 @@ from ATRI import __version__ from ATRI.rule import to_bot from ATRI.service import Service, SERVICES_DIR, ServiceTools from ATRI.config import BotSelfConfig -from ATRI.exceptions import ReadFileError SERVICE_INFO_FORMAT = """ @@ -84,7 +83,7 @@ class Helper(Service): def service_info(service: str) -> str: try: data = ServiceTools().load_service(service) - except ReadFileError: + except Exception: return "请检查是否输入错误呢...@bot 帮助 [服务]" service_name = data.get("service", "error") @@ -106,7 +105,7 @@ class Helper(Service): def cmd_info(service: str, cmd: str) -> str: try: data = ServiceTools().load_service(service) - except ReadFileError: + except Exception: return "请检查是否输入错误..." cmd_list: dict = data["cmd_list"] |