Update pid_search.py

This commit is contained in:
HibiKier 2022-05-22 01:46:52 +08:00 committed by GitHub
parent 02743d5955
commit a4bc04c958
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,8 @@ async def _g(event: MessageEvent, state: T_State, pid: str = Arg("pid")):
except Exception as e: except Exception as e:
await pid_search.finish(f"发生了一些错误..{type(e)}{e}") await pid_search.finish(f"发生了一些错误..{type(e)}{e}")
else: else:
if data.get("error"):
await pid_search.finish(data["error"]["user_message"], at_sender=True)
data = data["illust"] data = data["illust"]
if not data["width"] and not data["height"]: if not data["width"] and not data["height"]:
await pid_search.finish(f"没有搜索到 PID{pid} 的图片", at_sender=True) await pid_search.finish(f"没有搜索到 PID{pid} 的图片", at_sender=True)