修改变量名
This commit is contained in:
parent
196d3d8549
commit
3e68e1b509
|
@ -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'])
|
||||
|
|
|
@ -34,5 +34,3 @@ 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
|
Loading…
Reference in New Issue
Block a user