From 57f3741d78b63d49dec4996c5cb3fee90ea1cced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Sun, 23 Jul 2023 19:04:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++++ plugins/adapter/ComWeChat.js | 8 ++++---- plugins/adapter/GSUIDCore.js | 8 ++++---- plugins/adapter/go-cqhttp.js | 8 ++++---- plugins/other/install.js | 14 ++++++++------ 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e700fa1..6fbfe50 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,12 @@ ws://localhost:2536/GSUIDCore +
代理 + +[TRSS-Yunzai Proxy Plugin](../../../Yunzai-Proxy-Plugin) + +
+ 6.设置主人:发送 `#设置主人`,后台日志获取验证码并发送 ## 致谢 diff --git a/plugins/adapter/ComWeChat.js b/plugins/adapter/ComWeChat.js index 90940c4..fd45963 100644 --- a/plugins/adapter/ComWeChat.js +++ b/plugins/adapter/ComWeChat.js @@ -443,10 +443,10 @@ Bot.adapter.push(new class ComWeChatAdapter { load() { Bot.wss[this.path] = new WebSocketServer({ noServer: true }) - Bot.wss[this.path].on("connection", ws => { - ws.on("error", logger.error) - ws.on("message", data => this.message(data, ws)) - }) + Bot.wss[this.path].on("connection", ws => ws + .on("error", logger.error) + .on("message", data => this.message(data, ws)) + ) return true } }) \ No newline at end of file diff --git a/plugins/adapter/GSUIDCore.js b/plugins/adapter/GSUIDCore.js index f60dd30..b6a1cf0 100644 --- a/plugins/adapter/GSUIDCore.js +++ b/plugins/adapter/GSUIDCore.js @@ -265,10 +265,10 @@ Bot.adapter.push(new class GSUIDCoreAdapter { load() { Bot.wss[this.path] = new WebSocketServer({ noServer: true }) - Bot.wss[this.path].on("connection", ws => { - ws.on("error", logger.error) - ws.on("message", data => this.message(data, ws)) - }) + Bot.wss[this.path].on("connection", ws => ws + .on("error", logger.error) + .on("message", data => this.message(data, ws)) + ) return true } }) \ No newline at end of file diff --git a/plugins/adapter/go-cqhttp.js b/plugins/adapter/go-cqhttp.js index 094dbad..2414031 100644 --- a/plugins/adapter/go-cqhttp.js +++ b/plugins/adapter/go-cqhttp.js @@ -852,10 +852,10 @@ Bot.adapter.push(new class gocqhttpAdapter { load() { Bot.wss[this.path] = new WebSocketServer({ noServer: true }) - Bot.wss[this.path].on("connection", ws => { - ws.on("error", logger.error) - ws.on("message", data => this.message(data, ws)) - }) + Bot.wss[this.path].on("connection", ws => ws + .on("error", logger.error) + .on("message", data => this.message(data, ws)) + ) return true } }) \ No newline at end of file diff --git a/plugins/other/install.js b/plugins/other/install.js index 93525b5..056ae8b 100644 --- a/plugins/other/install.js +++ b/plugins/other/install.js @@ -13,16 +13,18 @@ const list = { "earth-k-plugin" :"https://gitee.com/SmallK111407/earth-k-plugin", "xiaofei-plugin" :"https://gitee.com/xfdown/xiaofei-plugin", "xiaoyao-cvs-plugin":"https://gitee.com/Ctrlcvs/xiaoyao-cvs-plugin", + "mysVilla-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-mysVilla-Plugin", "Telegram-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-Telegram-Plugin", "Discord-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-Discord-Plugin", "QQGuild-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-QQGuild-Plugin", "WeChat-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-WeChat-Plugin", + "Proxy-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-Proxy-Plugin", "ICQQ-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-ICQQ-Plugin", "KOOK-Plugin" :"https://gitee.com/TimeRainStarSky/Yunzai-KOOK-Plugin", } export class install extends plugin { - constructor () { + constructor() { super({ name: "安装插件", dsc: "#安装插件 #安装TRSS-Plugin", @@ -37,7 +39,7 @@ export class install extends plugin { }) } - async install () { + async install() { if (insing) { await this.reply("已有命令安装中..请勿重复操作") return false @@ -68,7 +70,7 @@ export class install extends plugin { this.restart() } - async execSync (cmd) { + async execSync(cmd) { return new Promise(resolve => { exec(cmd, (error, stdout, stderr) => { resolve({ error, stdout, stderr }) @@ -76,7 +78,7 @@ export class install extends plugin { }) } - async runInstall (name, url, path) { + async runInstall(name, url, path) { this.isNowUp = false let cm = `git clone --depth 1 --single-branch "${url}" "${path}"` @@ -99,7 +101,7 @@ export class install extends plugin { return true } - async gitErr (err, stdout) { + async gitErr(err, stdout) { let msg = "安装失败!" let errMsg = err.toString() stdout = stdout.toString() @@ -119,7 +121,7 @@ export class install extends plugin { await this.reply([errMsg, stdout]) } - restart () { + restart() { new Restart(this.e).restart() } }