mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-30 02:44:06 +00:00
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
import { Data, Version } from './components/index.js'
|
|
|
|
export * from './apps/index.js'
|
|
let index = { miao: {} }
|
|
if (Version.isV3) {
|
|
index = await Data.importModule('adapter/v3-entrance.js')
|
|
}
|
|
export const miao = index.miao || {}
|
|
if (Bot?.logger?.info) {
|
|
Bot.logger.info('---------^_^---------')
|
|
Bot.logger.info(`喵喵插件${Version.version}初始化~`)
|
|
} else {
|
|
console.log(`喵喵插件${Version.version}初始化~`)
|
|
}
|
|
|
|
setTimeout(async function () {
|
|
let msgStr = await redis.get('miao:restart-msg')
|
|
let relpyPrivate = async function () {
|
|
}
|
|
if (!Version.isV3) {
|
|
let common = await Data.importModule('lib/common.js')
|
|
if (common && common.default && common.default.relpyPrivate) {
|
|
relpyPrivate = common.default.relpyPrivate
|
|
}
|
|
}
|
|
if (msgStr) {
|
|
let msg = JSON.parse(msgStr)
|
|
await relpyPrivate(msg.qq, msg.msg)
|
|
await redis.del('miao:restart-msg')
|
|
let msgs = [`当前喵喵版本: ${Version.version}`, '您可使用 #喵喵版本 命令查看更新信息']
|
|
await relpyPrivate(msg.qq, msgs.join('\n'))
|
|
}
|
|
}, 1000)
|