docs: 修改说明

This commit is contained in:
ningmengchongshui 2024-06-15 11:39:06 +08:00
parent 9fcf22ccbe
commit 47897176e2
8 changed files with 33 additions and 23 deletions

View File

@ -1,8 +1,6 @@
# System-Plugin # 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 git clone --depth=1 -b system https://github.com/yoimiya-kokomi/Miao-Yunzai.git ./plugins/system-plugin
``` ```
## 功能列表
| 功能 | 指令 | 说明 |
|-------| ----- |------ |
| 日志 | #更新日志 #运行日志 | 嘎嘎 |
| 更新| #更新 #全部更新 | 嘎嘎 |
| 状态 | #状态 | 嘎嘎 |
| 运行 | #重启 #关机 | 嘎嘎 |
| 娱乐 | #复读 | 嘎嘎|
| 表情 | #添加xxx | 嘎嘎|
## 图片开发
```sh
npm run image
```

View File

@ -30,24 +30,24 @@ export class add extends Plugin {
this.priority = 50000 this.priority = 50000
this.rule = [ this.rule = [
{ {
reg: '^#(全局)?添加(.*)', reg: /^#(全局)?添加(.*)/,
fnc: this.add.name fnc: this.add.name
}, },
{ {
reg: '^#(全局)?删除(.*)', reg: /^#(全局)?删除(.*)/,
fnc: this.del.name fnc: this.del.name
}, },
{ {
reg: '(.*)', reg: /(.*)/,
fnc: this.getText.name, fnc: this.getText.name,
log: false log: false
}, },
{ {
reg: '^#+(全局)?(?:查看|查询)(?:表情|词条)(.+)$', reg: /^#+(全局)?(?:查看|查询)(?:表情|词条)(.+)$/,
fnc: this.faceDetail.name fnc: this.faceDetail.name
}, },
{ {
reg: '#(全局)?(表情|词条)(.*)', reg: /#(全局)?(表情|词条)(.*)/,
fnc: this.list.name fnc: this.list.name
}, },
] ]

View File

@ -12,7 +12,7 @@ export class example2 extends Plugin {
this.priority = 5000 this.priority = 5000
this.rule = [ this.rule = [
{ {
reg: '^#复读$', reg: /^#复读$/,
fnc: this.repeat.name fnc: this.repeat.name
} }
] ]

View File

@ -42,12 +42,12 @@ export class Restart extends Plugin {
this.priority = 10 this.priority = 10
this.rule = [ this.rule = [
{ {
reg: '^#重启$', reg: /^#重启$/,
fnc: this.restart.name, fnc: this.restart.name,
permission: 'master' permission: 'master'
}, },
{ {
reg: '^#(停机|关机)$', reg: /^#(停机|关机)$/,
fnc: this.stop.name, fnc: this.stop.name,
permission: 'master' permission: 'master'
} }

View File

@ -24,7 +24,7 @@ export class sendLog extends Plugin {
super() super()
this.rule = [ this.rule = [
{ {
reg: "^#(运行|错误)*日志[0-9]*(.*)", reg: /^#(运行|错误)*日志[0-9]*(.*)/,
fnc: this.sendLog.name, fnc: this.sendLog.name,
permission: "master" permission: "master"
} }

View File

@ -19,7 +19,7 @@ export class status extends Plugin {
super() super()
this.rule = [ this.rule = [
{ {
reg: '^#状态$', reg: /^#状态$/,
fnc: this.status.name fnc: this.status.name
} }
] ]

View File

@ -13,7 +13,7 @@ import { BOT_NAME } from 'yunzai/config'
let uping = false let uping = false
const Cache = new Map() // const Cache = new Map()
/** /**
* *

View File

@ -1,13 +1,7 @@
{ {
"name": "system-plugin", "name": "system-plugin",
"type": "module", "type": "module",
"scripts": { "scripts": {},
}, "dependencies": {},
"dependencies": { "devDependencies": {}
"image-size": "^1.0.2"
},
"devDependencies": {
"cheerio": "1.0.0-rc.12",
"request": "^2.88.2"
}
} }