From df081ef0cf0cfd86f8253de26d4e09fe01b7e311 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: Sun, 28 Jul 2024 15:40:44 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/src/apis/system.ts | 4 ---- .../msg/SendMsg/create-send-elements.ts | 20 ------------------- 2 files changed, 24 deletions(-) diff --git a/src/core/src/apis/system.ts b/src/core/src/apis/system.ts index 71fb6db6..52d3f997 100644 --- a/src/core/src/apis/system.ts +++ b/src/core/src/apis/system.ts @@ -2,10 +2,6 @@ import { NTEventDispatch } from '@/common/utils/EventTask'; import { GeneralCallResult, NTQQFileApi, NTQQUserApi, napCatCore } from '@/core'; -setTimeout(async () => { - let ret = JSON.stringify(await NTQQFileApi.searchfile(['doc'])); - console.log(ret); -}, 20000) export class NTQQSystemApi { static async hasOtherRunningQQProcess() { return napCatCore.util.hasOtherRunningQQProcess(); diff --git a/src/onebot11/action/msg/SendMsg/create-send-elements.ts b/src/onebot11/action/msg/SendMsg/create-send-elements.ts index 9769db8c..8a95bd97 100644 --- a/src/onebot11/action/msg/SendMsg/create-send-elements.ts +++ b/src/onebot11/action/msg/SendMsg/create-send-elements.ts @@ -30,26 +30,6 @@ async function handleOb11FileLikeMessage( ) { const uri = file; - // const cache = await dbUtil.getFileCacheByName(file); - // if (cache) { - // if (fs.existsSync(cache.path)) { - // uri = 'file://' + cache.path; - // } else if (cache.url) { - // uri = cache.url; - // } else { - // const fileMsgPeer = MessageUnique.getPeerByMsgId(cache.msgId); - // if (fileMsgPeer) { - // cache.path = await NTQQFileApi.downloadMedia( - // fileMsgPeer.MsgId, fileMsgPeer.Peer.chatType, fileMsgPeer.Peer.peerUid, - // cache.elementId, '', '' - // ); - // uri = 'file://' + cache.path; - // dbUtil.updateFileCache(cache); - // } - // } - // logDebug('找到文件缓存', uri); - // } - const { path, isLocal, fileName, errMsg } = (await uri2local(uri)); if (errMsg) {