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