mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-30 13:39:03 +08:00
fix: #563
This commit is contained in:
parent
1adb4a4ba8
commit
c3568d07e8
@ -912,11 +912,19 @@ export class OneBotMsgApi {
|
||||
guildId: '',
|
||||
peerUid: peer.peerUid,
|
||||
}, returnMsg.msgId);
|
||||
|
||||
setTimeout(() => {
|
||||
deleteAfterSentFiles.forEach(file => {
|
||||
fsPromise.unlink(file).then().catch(e => this.core.context.logger.logError.bind(this.core.context.logger)('发送消息删除文件失败', e));
|
||||
try {
|
||||
if (fs.existsSync(file)) {
|
||||
fsPromise.unlink(file).then().catch(e => this.core.context.logger.logError.bind(this.core.context.logger)('发送消息删除文件失败', e));
|
||||
}
|
||||
} catch (error) {
|
||||
this.core.context.logger.logError.bind(this.core.context.logger)('发送消息删除文件失败', (e as Error).message)
|
||||
}
|
||||
});
|
||||
}, 60000);
|
||||
|
||||
return returnMsg;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user