diff --git a/package.json b/package.json index c92c27c..04167e0 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,11 @@ }, "imports": { "#image/*": "./image/*", - "#miao/*": "./src/*", + "#yunzai/config": "./src/config/index.js", + "#yunzai/core": "./src/core/index.js", + "#yunzai/db": "./src/db/index.js", + "#yunzai/mys": "./src/mys/index.js", + "#yunzai/utils": "./src/utils/index.js", "#miao": "./plugins/miao-plugin/components/index.js", "#miao.models": "./plugins/miao-plugin/models/index.js" } diff --git a/src/core/index.ts b/src/core/index.ts index 02f91b3..70b6f58 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,4 +1,5 @@ export * from './plugins/index.js' export * from './plugins/functional.js' export * from './plugins/types.js' +export * from './plugins/common.js' export * from './icqq.js' diff --git a/src/core/plugins/index.ts b/src/core/plugins/index.ts index 25cfbc9..465050d 100644 --- a/src/core/plugins/index.ts +++ b/src/core/plugins/index.ts @@ -1,5 +1,4 @@ -import { segment } from 'icqq' import { Common } from '../../miao.js' import { EventType } from './types.js' @@ -51,9 +50,7 @@ export class plugin { /** * */ - e: EventType & { - segment: typeof segment - } + e: EventType /** * @param name 插件名称 @@ -128,9 +125,6 @@ export class plugin { this.namespace = namespace || '' } - // 携带segment - this.e.segment = segment - } /** @@ -138,9 +132,8 @@ export class plugin { * @param quote 是否引用回复 * @param data.recallMsg 群聊是否撤回消息,0-120秒,0不撤回 * @param data.at 是否at用户 - * @deprecated 已废弃 */ - reply(msg = '', quote = false, data = {}) { + reply(msg: any[] | string = '', quote = false, data = {}) { if (!this.e?.reply || !msg) return false return this.e.reply(msg, quote, data) } diff --git a/tsconfig.json b/tsconfig.json index 5262cee..8396c24 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -35,7 +35,7 @@ "paths": { // 内部核心模块导出 "#image/*": ["./image/*"], - "#miao/*": ["./src/*"], + "#yunzai/*": ["./src/*"], // 外部模块 待移除 "#miao": ["./plugins/miao-plugin/components/index.js"], "#miao.models": ["./plugins/miao-plugin/models/index.js"] @@ -46,5 +46,5 @@ "transpileOnly": true, "experimentalSpecifierResolution": "node" }, - "include": ["src", "image", "plugins"] + "include": ["src", "image", "plugins", "plugins/system-plugin"] }