From 7c2a44bb3f108d62ce53b5fb2002749426f778fe Mon Sep 17 00:00:00 2001 From: xmengnet <794508986@qq.com> Date: Thu, 24 Jun 2021 15:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhhsh=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker/hhsh.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/worker/hhsh.py b/worker/hhsh.py index 16af5c2..d4686f8 100644 --- a/worker/hhsh.py +++ b/worker/hhsh.py @@ -1,6 +1,7 @@ from zzcore import StdAns, mysakuya import requests + class Ans(StdAns): def GETMSG(self): if len(self.parms) < 2: @@ -11,8 +12,11 @@ class Ans(StdAns): msg = f"[CQ:reply,id={self.raw_msg['message_id']}]" r = nbnhhsh(self.parms[1]) - msg += f'''{(str(r['trans'])[1:-1]).replace("'","").replace(","," ")}''' - + try: + msg += f'''{(str(r['trans'])[1:-1]).replace("'", "").replace(",", " ")}''' + except: + msg += "没查到(" + return msg