5 Star 23 Fork 0

星雪/优纪插件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.js 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
import chalk from 'chalk';
import Config from './utils/config.js';
import path from 'path';
import { _paths } from './utils/paths.js';
import YukiBili from './apps/bilibili.js';
import YukiHelp from './apps/help.js';
import YukiVersion from './apps/version.js';
import YukiWeibo from './apps/weibo.js';
const yukiPluginVersion = Config.getPackageJsonKey('version', path.join(_paths.pluginPath, 'package.json'));
if (!global.segment) {
try {
global.segment = (await import('oicq')).segment;
}
catch (err) {
global.segment = (await import('icqq')).segment;
}
}
let apps = { YukiBili, YukiHelp, YukiVersion, YukiWeibo };
let rules = {};
let count = 0;
for (let key in apps) {
if (!apps[key]) {
logger.error(`载入插件错误:${[key]}`);
continue;
}
rules[`${key}`] = apps[key];
count++;
}
logger.info(chalk.rgb(0, 190, 255)(`-----------------------------------------`));
logger.info(chalk.rgb(255, 225, 255)(`|优纪插件 ${yukiPluginVersion} 初始化~`));
logger.info(chalk.rgb(255, 245, 255)(`|作者:snowtafir`));
logger.info(chalk.rgb(255, 225, 255)(`|仓库地址:`));
logger.info(chalk.rgb(255, 245, 255)(`|https://github.com/snowtafir/yuki-plugin`));
logger.info(chalk.rgb(0, 190, 255)(`-----------------------------------------`));
logger.info(chalk.rgb(0, 190, 255)(`★ 优纪插件加载完成,共计加载${count}个app`));
export { rules as apps };
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/snowtafir/yuki-plugin.git
[email protected]:snowtafir/yuki-plugin.git
snowtafir
yuki-plugin
优纪插件
main3

搜索帮助