just fxxx it up

This commit is contained in:
shenjack 2023-10-05 13:08:41 +08:00
parent 78b24f0689
commit d5f289887f
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -188,10 +188,7 @@ async def add_message(data: Dict[str, Any]):
elif data.get('message').get('content').startswith('=='):
evals: str = data.get('message').get('content')[2:]
try:
result = await asyncio.to_thread(safe_eval, evals)
except asyncio.TimeoutError:
result = f'{evals}\n超时'
result = await safe_eval(evals)
reply = ReplyMessage(id=data['message']['_id'])
message = Message(content=result,
reply_to=reply,