From 808777c04474cd0ef769b2eec8ffa941843e33b5 Mon Sep 17 00:00:00 2001 From: idranme Date: Mon, 5 Aug 2024 19:18:15 +0800 Subject: [PATCH] fix: import path --- manifest.json | 2 +- src/ntqqapi/api/file.ts | 4 ++-- src/ntqqapi/api/msg.ts | 2 +- src/ntqqapi/api/user.ts | 4 +--- src/ntqqapi/types/msg.ts | 7 +++---- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index f6e8266..30ce472 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "type": "extension", "name": "LLOneBot", "slug": "LLOneBot", - "description": "实现 OneBot 11 协议,帮助进行 QQ 机器人开发", + "description": "实现 OneBot 11 协议,用以 QQ 机器人开发", "version": "3.27.4", "icon": "./icon.webp", "authors": [ diff --git a/src/ntqqapi/api/file.ts b/src/ntqqapi/api/file.ts index 8776e2c..0a05f22 100644 --- a/src/ntqqapi/api/file.ts +++ b/src/ntqqapi/api/file.ts @@ -16,8 +16,8 @@ import fs from 'fs' import { ReceiveCmdS } from '../hook' import { log } from '@/common/utils' import { rkeyManager } from '@/ntqqapi/api/rkey' -import { wrapperApi } from '@/ntqqapi/native/wrapper' -import { Peer } from '@/ntqqapi/api/msg' +import { wrapperApi } from '@/ntqqapi/wrapper' +import { Peer } from '@/ntqqapi/types/msg' export class NTQQFileApi { static async getVideoUrl(peer: Peer, msgId: string, elementId: string): Promise { diff --git a/src/ntqqapi/api/msg.ts b/src/ntqqapi/api/msg.ts index 1bd2da8..b5619e7 100644 --- a/src/ntqqapi/api/msg.ts +++ b/src/ntqqapi/api/msg.ts @@ -6,7 +6,7 @@ import { ReceiveCmdS, registerReceiveHook } from '../hook' import { log } from '../../common/utils/log' import { sleep } from '../../common/utils/helper' import { isQQ998 } from '../../common/utils' -import { wrapperApi } from '@/ntqqapi/native/wrapper' +import { wrapperApi } from '@/ntqqapi/wrapper' export let sendMessagePool: Record void) | null> = {} // peerUid: callbackFunc diff --git a/src/ntqqapi/api/user.ts b/src/ntqqapi/api/user.ts index 90dc84a..010d15a 100644 --- a/src/ntqqapi/api/user.ts +++ b/src/ntqqapi/api/user.ts @@ -2,10 +2,8 @@ import { callNTQQApi, GeneralCallResult, NTQQApiClass, NTQQApiMethod } from '../ import { Group, SelfInfo, User } from '../types' import { ReceiveCmdS } from '../hook' import { selfInfo, uidMaps } from '../../common/data' -import { NTQQWindowApi, NTQQWindows } from './window' import { cacheFunc, isQQ998, log, sleep } from '../../common/utils' -import { wrapperApi } from '@/ntqqapi/native/wrapper' -import * as https from 'https' +import { wrapperApi } from '@/ntqqapi/wrapper' import { RequestUtil } from '@/common/utils/request' let userInfoCache: Record = {} // uid: User diff --git a/src/ntqqapi/types/msg.ts b/src/ntqqapi/types/msg.ts index e50295f..c4c3c2f 100644 --- a/src/ntqqapi/types/msg.ts +++ b/src/ntqqapi/types/msg.ts @@ -1,5 +1,4 @@ import { GroupMemberRole } from './group' -import exp from 'constants' export enum ElementType { TEXT = 1, @@ -417,7 +416,7 @@ export interface RawMessage { } export interface Peer { - chatType: ChatType; - peerUid: string; // 如果是群聊uid为群号,私聊uid就是加密的字符串 - guildId?: string; + chatType: ChatType + peerUid: string // 如果是群聊uid为群号,私聊uid就是加密的字符串 + guildId?: string } \ No newline at end of file