From 959d70aaa0d3b714751ced6a3b93d96cd0b2a4ed Mon Sep 17 00:00:00 2001 From: xmengnet <51263043+xmengnet@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:54:23 +0800 Subject: [PATCH] Delete hhsh.py --- worker/hhsh.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 worker/hhsh.py diff --git a/worker/hhsh.py b/worker/hhsh.py deleted file mode 100644 index d4686f8..0000000 --- a/worker/hhsh.py +++ /dev/null @@ -1,30 +0,0 @@ -from zzcore import StdAns, mysakuya -import requests - - -class Ans(StdAns): - def GETMSG(self): - if len(self.parms) < 2: - return '不加参数是坏文明!' - - if mysakuya(self, self.raw_msg['raw_message']) == False: - return "不许你们说咲夜!!" - - msg = f"[CQ:reply,id={self.raw_msg['message_id']}]" - r = nbnhhsh(self.parms[1]) - try: - msg += f'''{(str(r['trans'])[1:-1]).replace("'", "").replace(",", " ")}''' - except: - msg += "没查到(" - - return msg - - -def nbnhhsh(text): - url = 'https://lab.magiconch.com/api/nbnhhsh/guess' - data = { - 'text': text, - } - - r = requests.post(url=url, data=data).json() - return r[0] \ No newline at end of file