fix: 文件后清除

This commit is contained in:
手瓜一十雪 2024-11-20 10:19:43 +08:00
parent 648faedca6
commit f44f6fd1e9

View File

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