From d5f289887ffd45f322bf718c3f88cda6a32329c2 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Thu, 5 Oct 2023 13:08:41 +0800 Subject: [PATCH] just fxxx it up --- connect.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/connect.py b/connect.py index 5292b9d..9f46361 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,