fix: 修复插件错误和更改别名

This commit is contained in:
ningmengchongshui 2024-06-11 21:33:21 +08:00
parent f665dcf634
commit ce73f7da60
4 changed files with 10 additions and 12 deletions

View File

@ -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"
}

View File

@ -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'

View File

@ -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-1200
* @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)
}

View File

@ -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"]
}