mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
7939de8291
* 可展示本期深渊的全部角色信息,包括组队、天赋及圣遗物 * 数据会上传至胡桃Api进行伤害排名,并展示在页面内 * 可在`#喵喵设置`中启用`#喵喵深渊`作为默认深渊功能,默认关闭
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
// 适配V3 Yunzai,将index.js移至app/index.js
|
||
import { currentVersion, isV3 } from './components/Changelog.js'
|
||
import Data from './components/Data.js'
|
||
|
||
export * from './apps/index.js'
|
||
let index = { miao: {} }
|
||
if (isV3) {
|
||
index = await Data.importModule('/plugins/miao-plugin/adapter', 'index.js')
|
||
}
|
||
export const miao = index.miao || {}
|
||
if (Bot?.logger?.info) {
|
||
Bot.logger.info(`---------^_^---------`)
|
||
Bot.logger.info(`喵喵插件${currentVersion}初始化~`)
|
||
} else {
|
||
console.log(`喵喵插件${currentVersion}初始化~`)
|
||
}
|
||
|
||
setTimeout(async function () {
|
||
let msgStr = await redis.get('miao:restart-msg')
|
||
let relpyPrivate = async function () {
|
||
}
|
||
if (!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 = [`当前喵喵版本: ${currentVersion}`, '您可使用 #喵喵版本 命令查看更新信息']
|
||
await relpyPrivate(msg.qq, msgs.join('\n'))
|
||
}
|
||
}, 1000)
|