1 Star 0 Fork 6

duskday/yunzai-c-v-plugin插件

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
up to V2.js 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
xwy 提交于 2023-04-24 23:49 +08:00 . 更新ql-plugin包大小
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
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/duskdn/yunzai-c-v-plugin.git
git@gitee.com:duskdn/yunzai-c-v-plugin.git
duskdn
yunzai-c-v-plugin
yunzai-c-v-plugin插件
master

搜索帮助