代码拉取完成,页面将自动刷新
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 };
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。