diff --git a/connect.py b/connect.py index 5292b9d3..9f463611 100644 --- a/connect.py +++ b/connect.py @@ -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,