From f44f6fd1e9f1fce7af98afbf126c6b8c47dede21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 20 Nov 2024 10:19:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E5=90=8E=E6=B8=85?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/api/msg.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/onebot/api/msg.ts b/src/onebot/api/msg.ts index 558d4e7c9..90e8141dc 100644 --- a/src/onebot/api/msg.ts +++ b/src/onebot/api/msg.ts @@ -867,9 +867,11 @@ export class OneBotMsgApi { guildId: '', peerUid: peer.peerUid, }, returnMsg.msgId); - deleteAfterSentFiles.forEach(file => { - fsPromise.unlink(file).then().catch(e => this.core.context.logger.logError.bind(this.core.context.logger)('发送消息删除文件失败', e)); - }); + setTimeout(() => { + deleteAfterSentFiles.forEach(file => { + fsPromise.unlink(file).then().catch(e => this.core.context.logger.logError.bind(this.core.context.logger)('发送消息删除文件失败', e)); + }); + }, 60000); return returnMsg; }