From 3e68e1b509e26c021b2beb0ac195a08dbc8a09bf Mon Sep 17 00:00:00 2001 From: SharwOrange Date: Sat, 30 Dec 2023 15:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- connect.py | 4 ++-- module/hitokoto/test.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/connect.py b/connect.py index 6d785e7..a9d2428 100644 --- a/connect.py +++ b/connect.py @@ -219,8 +219,8 @@ async def add_message(data: Dict[str, Any]): await sio.emit('sendMessage', message.to_json()) - elif content == f'!!hitokoto {stypet}': - hitokoto.hitokoto(stypet) + elif content == f'!!hitokoto {ctypet}': + hitokoto.hitokoto(ctypet) result_code, result_data = hitokoto.hitokoto() if result_code == 3: message= Message(content=f"输入参数无效,将随机选取一言句子类型",room_id=data['roomId']) diff --git a/module/hitokoto/test.py b/module/hitokoto/test.py index 1c419ff..fc4aa48 100644 --- a/module/hitokoto/test.py +++ b/module/hitokoto/test.py @@ -33,6 +33,4 @@ def hitokoto(ctypet): params_value={'c':ctype} hitokoto = requests.get('https://v1.hitokoto.cn',params=params_value) - return 0,(hitokoto.json()) - except Exception as e: - return 2, None \ No newline at end of file + return 0,(hitokoto.json()) \ No newline at end of file