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; }