From a4bc04c958d8cc3fb71fcbd3e33fe83bc871e885 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Sun, 22 May 2022 01:46:52 +0800 Subject: [PATCH] Update pid_search.py --- plugins/pid_search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/pid_search.py b/plugins/pid_search.py index d795a10c..be578d18 100755 --- a/plugins/pid_search.py +++ b/plugins/pid_search.py @@ -68,6 +68,8 @@ async def _g(event: MessageEvent, state: T_State, pid: str = Arg("pid")): except Exception as e: await pid_search.finish(f"发生了一些错误..{type(e)}:{e}") else: + if data.get("error"): + await pid_search.finish(data["error"]["user_message"], at_sender=True) data = data["illust"] if not data["width"] and not data["height"]: await pid_search.finish(f"没有搜索到 PID:{pid} 的图片", at_sender=True)