docs: 修改说明
This commit is contained in:
parent
9fcf22ccbe
commit
47897176e2
22
README.md
22
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
|
||||
```
|
10
apps/add.ts
10
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
|
||||
},
|
||||
]
|
||||
|
|
|
@ -12,7 +12,7 @@ export class example2 extends Plugin {
|
|||
this.priority = 5000
|
||||
this.rule = [
|
||||
{
|
||||
reg: '^#复读$',
|
||||
reg: /^#复读$/,
|
||||
fnc: this.repeat.name
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ export class sendLog extends Plugin {
|
|||
super()
|
||||
this.rule = [
|
||||
{
|
||||
reg: "^#(运行|错误)*日志[0-9]*(.*)",
|
||||
reg: /^#(运行|错误)*日志[0-9]*(.*)/,
|
||||
fnc: this.sendLog.name,
|
||||
permission: "master"
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export class status extends Plugin {
|
|||
super()
|
||||
this.rule = [
|
||||
{
|
||||
reg: '^#状态$',
|
||||
reg: /^#状态$/,
|
||||
fnc: this.status.name
|
||||
}
|
||||
]
|
||||
|
|
|
@ -13,7 +13,7 @@ import { BOT_NAME } from 'yunzai/config'
|
|||
|
||||
let uping = false
|
||||
|
||||
const Cache = new Map()
|
||||
// const Cache = new Map()
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
12
package.json
12
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": {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue