代码拉取完成,页面将自动刷新
同步操作将从 xwy/yunzai-c-v-plugin插件 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import fetch from "node-fetch";
import { createRequire } from 'module'
import common from'../../../lib/common/common.js'
import plugin from '../../../lib/plugins/plugin.js';
export class up extends plugin {
constructor() {
super({
name: 'up to V2',
dsc: '清凉图升级',
event: 'message',
priority: 10,//优先级,数越小优先度越高
rule: [
{
reg: '^#?清凉图升级$',
fnc: 'up',
permission: "master",
},
]
})
}
async up(e){
const require = createRequire(import.meta.url)
const { exec } = require('child_process')
const execSync = function(cmd) {
return new Promise((resolve, reject) => {
exec(cmd, { windowsHide: true }, (error, stdout, stderr) => {
resolve({ error, stdout, stderr })
})
})
}
await e.reply('即将安装清凉插件(ql-plugin),共2MB')
await common.sleep(2000);
await e.reply('以下为用户协议,若您继续使用本插件,则代表您同意本协议,协议链接:https://gitee.com/xwy231321/ql-plugin/blob/master/%E7%94%A8%E6%88%B7%E5%8D%8F%E8%AE%AE.txt')
await common.sleep(2000);
let cmd = `git clone https://gitee.com/xwy231321/ql-plugin.git ./plugins/ql-plugin/`
execSync(cmd)
await common.sleep(2000);
e.reply('安装指令完毕,勿重复安装,请手动重启,若安装失败,请检查是否正确安装git,当前测试内容:铯图二元图三元图清秀图p18图清凉图')
return true
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。