Skip to content

Commit

Permalink
fix: 文件后清除
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Nov 20, 2024
1 parent 648faed commit f44f6fd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/onebot/api/msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f44f6fd

Please sign in to comment.