1 Star 0 Fork 14

Sora丶绯樱/xiaoyao-cvs-plugin

forked from Ctrlcvs/xiaoyao-cvs-plugin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
Ctrlcvs 提交于 2022-09-26 23:17 . 修改日志输出
// 适配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 = {
atlas: {}
}
if (isV3) {
Bot.logger=logger
index = await Data.importModule('/plugins/xiaoyao-cvs-plugin/adapter', 'index.js')
}
export const atlas = index.atlas || {}
Bot.logger.info(`---------^_^---------`)
Bot.logger.info(`图鉴插件${currentVersion}初始化~`)
setTimeout(async function() {
let msgStr = await redis.get('xiaoyao: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('xiaoyao:restart-msg')
let msgs = [`当前图鉴版本: ${currentVersion}`, '您可使用 #图鉴版本 命令查看更新信息']
await relpyPrivate(msg.qq, msgs.join('\n'))
}
}, 1000)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/SoraCode/xiaoyao-cvs-plugin.git
git@gitee.com:SoraCode/xiaoyao-cvs-plugin.git
SoraCode
xiaoyao-cvs-plugin
xiaoyao-cvs-plugin
master

搜索帮助