koishi-plugin-common
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6
{ | ||
"name": "koishi-plugin-common", | ||
"version": "1.0.0-alpha.5", | ||
"description": "Common plugins for Koishi", | ||
"version": "1.0.0-alpha.6", | ||
"main": "dist/index.js", | ||
@@ -20,10 +21,18 @@ "typings": "dist/index.d.ts", | ||
"homepage": "https://github.com/koishijs/koishi/tree/master/packages/plugin-common#readme", | ||
"keywords": [ | ||
"bot", | ||
"qqbot", | ||
"cqhttp", | ||
"coolq", | ||
"chatbot", | ||
"koishi", | ||
"plugin" | ||
], | ||
"devDependencies": { | ||
"husky": "^3.1.0", | ||
"koishi-database-mysql": "^1.0.0-alpha.5" | ||
"koishi-database-mysql": "^1.0.0-alpha.6" | ||
}, | ||
"dependencies": { | ||
"koishi-core": "^1.0.0-alpha.5", | ||
"koishi-utils": "^1.0.0-alpha.1" | ||
"koishi-core": "^1.0.0-alpha.6", | ||
"koishi-utils": "^1.0.0-alpha.2" | ||
} | ||
} |
@@ -91,5 +91,5 @@ # [koishi-plugin-common](https://koishijs.github.io/plugins/common.html) | ||
## 插件:authorize | ||
## 插件:authorizeUser | ||
authorize 插件用于设置某个群中默认的玩家权限: | ||
authorizeUser 插件用于设置特定玩家的权限: | ||
@@ -99,3 +99,18 @@ ```js | ||
plugins: ['common', { | ||
authorize: { | ||
authorizeUser: { | ||
// 设置玩家权限 | ||
123456789: 3, | ||
} | ||
}], | ||
} | ||
``` | ||
## 插件:authorizeGroup | ||
authorizeGroup 插件用于设置某个群中默认的玩家权限: | ||
```js | ||
module.exports = { | ||
plugins: ['common', { | ||
authorizeGroup: { | ||
// 设置全群玩家权限为 2 级 | ||
@@ -116,3 +131,3 @@ 111222333: 2, | ||
这里的权限设置不仅会在机器人每次启动时生效,也会在有人加群时生效。 | ||
这里的权限设置不仅会在机器人每次启动时生效,也会在有人加群时生效。同时,与 authorizeUser 不同的是,后者是强制设置玩家等级,而 authorizeGroup 则是设置最低等级,即当玩家等级低于该值时才进行更新。 | ||
@@ -119,0 +134,0 @@ **注意:** 由于 CoolQ 的机制问题,机器人刚加某个群时可能无法获取成员列表,从而导致插件无法运行。遇到这种情况一般等待 1-2 天即可恢复正常。 |
Sorry, the diff of this file is not supported yet
1
348
253527
Updatedkoishi-core@^1.0.0-alpha.6
Updatedkoishi-utils@^1.0.0-alpha.2