From 47897176e2805a092fb2c06ac6f3ca689d6818b0 Mon Sep 17 00:00:00 2001 From: ningmengchongshui <916415899@qq.com> Date: Sat, 15 Jun 2024 11:39:06 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 +++++++++++++++++++--- apps/add.ts | 10 +++++----- apps/example2.ts | 2 +- apps/restart.ts | 4 ++-- apps/sendLog.ts | 2 +- apps/status.ts | 2 +- apps/update.ts | 2 +- package.json | 12 +++--------- 8 files changed, 33 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index da2b70d..94a45a5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # System-Plugin -Miao-Yunzai V4 插件开发示例 - -该插件并不会频繁更新,只是开发用例,功能可自行选择 +提供一些必要的,对机器人进行管理的功能。 ## 使用教程 @@ -12,3 +10,21 @@ Miao-Yunzai V4 插件开发示例 git clone --depth=1 -b system https://github.com/yoimiya-kokomi/Miao-Yunzai.git ./plugins/system-plugin ``` +## 功能列表 + + +| 功能 | 指令 | 说明 | +|-------| ----- |------ | +| 日志 | #更新日志 #运行日志 | 嘎嘎 | +| 更新| #更新 #全部更新 | 嘎嘎 | +| 状态 | #状态 | 嘎嘎 | +| 运行 | #重启 #关机 | 嘎嘎 | +| 娱乐 | #复读 | 嘎嘎| +| 表情 | #添加xxx | 嘎嘎| + + +## 图片开发 + +```sh +npm run image +``` \ No newline at end of file diff --git a/apps/add.ts b/apps/add.ts index 43f09f6..4e630b7 100644 --- a/apps/add.ts +++ b/apps/add.ts @@ -30,24 +30,24 @@ export class add extends Plugin { this.priority = 50000 this.rule = [ { - reg: '^#(全局)?添加(.*)', + reg: /^#(全局)?添加(.*)/, fnc: this.add.name }, { - reg: '^#(全局)?删除(.*)', + reg: /^#(全局)?删除(.*)/, fnc: this.del.name }, { - reg: '(.*)', + reg: /(.*)/, fnc: this.getText.name, log: false }, { - reg: '^#+(全局)?(?:查看|查询)(?:表情|词条)(.+)$', + reg: /^#+(全局)?(?:查看|查询)(?:表情|词条)(.+)$/, fnc: this.faceDetail.name }, { - reg: '#(全局)?(表情|词条)(.*)', + reg: /#(全局)?(表情|词条)(.*)/, fnc: this.list.name }, ] diff --git a/apps/example2.ts b/apps/example2.ts index baa2348..bab3c83 100644 --- a/apps/example2.ts +++ b/apps/example2.ts @@ -12,7 +12,7 @@ export class example2 extends Plugin { this.priority = 5000 this.rule = [ { - reg: '^#复读$', + reg: /^#复读$/, fnc: this.repeat.name } ] diff --git a/apps/restart.ts b/apps/restart.ts index fa73e6f..cbbe12b 100644 --- a/apps/restart.ts +++ b/apps/restart.ts @@ -42,12 +42,12 @@ export class Restart extends Plugin { this.priority = 10 this.rule = [ { - reg: '^#重启$', + reg: /^#重启$/, fnc: this.restart.name, permission: 'master' }, { - reg: '^#(停机|关机)$', + reg: /^#(停机|关机)$/, fnc: this.stop.name, permission: 'master' } diff --git a/apps/sendLog.ts b/apps/sendLog.ts index dbb9b16..fa069cc 100644 --- a/apps/sendLog.ts +++ b/apps/sendLog.ts @@ -24,7 +24,7 @@ export class sendLog extends Plugin { super() this.rule = [ { - reg: "^#(运行|错误)*日志[0-9]*(.*)", + reg: /^#(运行|错误)*日志[0-9]*(.*)/, fnc: this.sendLog.name, permission: "master" } diff --git a/apps/status.ts b/apps/status.ts index 82dc968..c772d76 100644 --- a/apps/status.ts +++ b/apps/status.ts @@ -19,7 +19,7 @@ export class status extends Plugin { super() this.rule = [ { - reg: '^#状态$', + reg: /^#状态$/, fnc: this.status.name } ] diff --git a/apps/update.ts b/apps/update.ts index b46fad5..b5ab282 100644 --- a/apps/update.ts +++ b/apps/update.ts @@ -13,7 +13,7 @@ import { BOT_NAME } from 'yunzai/config' let uping = false -const Cache = new Map() +// const Cache = new Map() /** * diff --git a/package.json b/package.json index 65afc75..3e07a3f 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,7 @@ { "name": "system-plugin", "type": "module", - "scripts": { - }, - "dependencies": { - "image-size": "^1.0.2" - }, - "devDependencies": { - "cheerio": "1.0.0-rc.12", - "request": "^2.88.2" - } + "scripts": {}, + "dependencies": {}, + "devDependencies": {} }