From b658029c8433900bbd101b65e026e9c552176c95 Mon Sep 17 00:00:00 2001 From: SiHuan Date: Tue, 4 Aug 2020 21:48:48 +0800 Subject: [PATCH] update hhsh --- worker/hhsh.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/worker/hhsh.py b/worker/hhsh.py index ec886f3..97df0ef 100644 --- a/worker/hhsh.py +++ b/worker/hhsh.py @@ -10,9 +10,8 @@ class Ans(StdAns): return "不许你们说咲夜!!" msg = f"[CQ:reply,id={self.raw_msg['message_id']}]" - r = nbnhhsh(self.raw_msg['message'][6:]) - for i in r: - msg += f"{i['name']} {str(i['trans'])[1:-1]}\n" + r = nbnhhsh(self.parms[1]) + msg += f'''{(str(r['trans'])[1:-1]).replace("'","").replace(","," ")}''' return msg @@ -24,4 +23,4 @@ def nbnhhsh(text): } r = requests.post(url=url, data=data).json() - return r \ No newline at end of file + return r[0] \ No newline at end of file