diff --git a/src/onebot/action/extends/OCRImage.ts b/src/onebot/action/extends/OCRImage.ts index 8128fe4e..d01fd2cc 100644 --- a/src/onebot/action/extends/OCRImage.ts +++ b/src/onebot/action/extends/OCRImage.ts @@ -1,9 +1,7 @@ -import { DeviceList } from '@/onebot11/main'; import BaseAction from '../BaseAction'; import { ActionName } from '../types'; import { FromSchema, JSONSchema } from 'json-schema-to-ts'; import { checkFileReceived, uri2local } from '@/common/utils/file'; -import { NTQQSystemApi } from '@/core'; import fs from 'fs'; const SchemaData = { diff --git a/src/onebot/action/go-cqhttp/DownloadFile.ts b/src/onebot/action/go-cqhttp/DownloadFile.ts index 19fc9446..c3dfb15b 100644 --- a/src/onebot/action/go-cqhttp/DownloadFile.ts +++ b/src/onebot/action/go-cqhttp/DownloadFile.ts @@ -2,7 +2,7 @@ import BaseAction from '../BaseAction'; import { ActionName } from '../types'; import fs from 'fs'; import { join as joinPath } from 'node:path'; -import { calculateFileMD5, getTempDir, httpDownload } from '@/common/utils/file'; +import { calculateFileMD5, httpDownload } from '@/common/utils/file'; import { randomUUID } from 'crypto'; import { FromSchema, JSONSchema } from 'json-schema-to-ts'; interface FileResponse { diff --git a/src/onebot/action/go-cqhttp/UploadPrivareFile.ts b/src/onebot/action/go-cqhttp/UploadPrivareFile.ts index d143607f..368c917c 100644 --- a/src/onebot/action/go-cqhttp/UploadPrivareFile.ts +++ b/src/onebot/action/go-cqhttp/UploadPrivareFile.ts @@ -1,7 +1,5 @@ -import BaseAction from '../BaseAction'; -import { getGroup } from '@/core/data'; +import BaseAction from '../BaseAction';; import { ActionName } from '../types'; -import { SendMsgElementConstructor } from '@/core/entities/constructor'; import { ChatType, Peer, SendFileElement } from '@/core/entities'; import fs from 'fs'; import { SendMsg, sendMsg } from '@/onebot/action/msg/SendMsg'; diff --git a/src/onebot/action/group/GetGroupInfo.ts b/src/onebot/action/group/GetGroupInfo.ts index 0ab424aa..21f96bc9 100644 --- a/src/onebot/action/group/GetGroupInfo.ts +++ b/src/onebot/action/group/GetGroupInfo.ts @@ -1,4 +1,3 @@ -import { getGroup } from '@/core/data'; import { OB11Group } from '../../types'; import { OB11Constructor } from '../../helper/constructor'; import BaseAction from '../BaseAction'; diff --git a/src/onebot/action/group/GetGroupMemberInfo.ts b/src/onebot/action/group/GetGroupMemberInfo.ts index 262a472f..cd2058dc 100644 --- a/src/onebot/action/group/GetGroupMemberInfo.ts +++ b/src/onebot/action/group/GetGroupMemberInfo.ts @@ -36,7 +36,7 @@ class GetGroupMemberInfo extends BaseAction { this.CoreContext.context.logger.logDebug('群成员详细信息结果', info); Object.assign(member, info); } catch (e) { - this.CoreContext.context.loggerlogDebug('获取群成员详细信息失败, 只能返回基础信息', e); + this.CoreContext.context.logger.logDebug('获取群成员详细信息失败, 只能返回基础信息', e); } const date = Math.round(Date.now() / 1000); const retMember = OB11Constructor.groupMember(payload.group_id.toString(), member); @@ -57,7 +57,7 @@ class GetGroupMemberInfo extends BaseAction { } } } else { - const LastestMsgList = await NTQQGroupApi.getLastestMsg(payload.group_id.toString(), [payload.user_id.toString()]); + const LastestMsgList = await NTQQGroupApi.getLatestMsg(payload.group_id.toString(), [payload.user_id.toString()]); if (LastestMsgList?.msgList?.length && LastestMsgList?.msgList?.length > 0) { const last_send_time = LastestMsgList.msgList[0].msgTime; if (last_send_time && last_send_time != '0' && last_send_time != '') { diff --git a/src/onebot/action/system/GetVersionInfo.ts b/src/onebot/action/system/GetVersionInfo.ts index 330a1c59..dfdd3f27 100644 --- a/src/onebot/action/system/GetVersionInfo.ts +++ b/src/onebot/action/system/GetVersionInfo.ts @@ -1,12 +1,12 @@ import BaseAction from '../BaseAction'; import { OB11Version } from '../../types'; import { ActionName } from '../types'; -import { version } from '@/onebot11/version'; +import { version } from '@/onebot/version'; export default class GetVersionInfo extends BaseAction { actionName = ActionName.GetVersionInfo; - protected async _handle(payload: any): Promise { + protected async _handle(payload: any): Promise { return { app_name: 'NapCat.Onebot', protocol_version: 'v11',