koishi-plugin-group-control 0.1.0-beta.2 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +6 -6
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -33,23 +33,23 @@ var Config = import_koishi.Schema.intersect([
|
|
|
33
33
|
welcomeMessage: import_koishi.Schema.string().default("你好,我是机器人。感谢邀请我加入!").description("机器人加入群聊时发送的欢迎消息"),
|
|
34
34
|
blacklistMessage: import_koishi.Schema.string().default("此群聊已被拉黑,机器人将自动退出,请联系管理员移出黑名单。").description("被拉入黑名单群后在群内发送的提示"),
|
|
35
35
|
quitMessage: import_koishi.Schema.string().default("收到来自{userId}的指令,即将退出群聊。").description("用户发送quit指令后在群内发送的提示,支持变量{userId}"),
|
|
36
|
-
enableBlacklist: import_koishi.Schema.boolean().default(true).description("
|
|
36
|
+
enableBlacklist: import_koishi.Schema.boolean().default(true).description('启用"被踢出自动拉黑"功能'),
|
|
37
37
|
quitCommandEnabled: import_koishi.Schema.boolean().default(true).description("启用quit"),
|
|
38
38
|
quitCommandAuthority: import_koishi.Schema.number().default(3).description("quit指令所需权限")
|
|
39
39
|
}).description("基础群组管理")
|
|
40
40
|
}),
|
|
41
41
|
import_koishi.Schema.object({
|
|
42
42
|
frequency: import_koishi.Schema.object({
|
|
43
|
-
enabled: import_koishi.Schema.boolean().default(false).description("
|
|
44
|
-
limit: import_koishi.Schema.number().default(5).description("
|
|
43
|
+
enabled: import_koishi.Schema.boolean().default(false).description("启用频率控制(对所有指令生效)"),
|
|
44
|
+
limit: import_koishi.Schema.number().default(5).description("时间窗口内允许的最大指令次数"),
|
|
45
45
|
window: import_koishi.Schema.number().default(60).description("频率检测时间窗口(秒)"),
|
|
46
46
|
warnDelay: import_koishi.Schema.number().default(30).description("发出警告后,再次触发的时间阈值(秒),在此时间内再次触发则进入屏蔽状态"),
|
|
47
47
|
blockDur: import_koishi.Schema.number().default(300).description("触发频率限制后屏蔽的时长(秒)"),
|
|
48
|
-
warnMsg: import_koishi.Schema.string().default("
|
|
49
|
-
blockMsg: import_koishi.Schema.string().default("
|
|
48
|
+
warnMsg: import_koishi.Schema.string().default("指令频率过高,请慢一点~").description("频率过高时发送的警告消息"),
|
|
49
|
+
blockMsg: import_koishi.Schema.string().default("指令频率过高,本群指令已被禁用 {duration} 秒。").description("触发频率限制后发送的屏蔽通知消息,支持变量{duration}"),
|
|
50
50
|
blockedMsg: import_koishi.Schema.string().default("指令暂时被禁用,还有 {time} 秒解禁。").description("屏蔽期间接收到指令时的提示消息,支持变量{time}"),
|
|
51
51
|
whitelist: import_koishi.Schema.array(String).default([]).description("频率控制白名单群号列表,白名单内的群聊不受频率限制")
|
|
52
|
-
}).description("
|
|
52
|
+
}).description("指令频率控制")
|
|
53
53
|
})
|
|
54
54
|
]);
|
|
55
55
|
function isBlacklistEnabled(config) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-group-control",
|
|
3
3
|
"description": "Koishi群聊自管理插件,支持自定义机器人进群消息、被踢出自动拉黑、刷屏自动屏蔽功能和主动退群指令。(仅支持OneBot适配器)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"lib",
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
|
+
"homepage": "https://github.com/muyni233/koishi-plugin-group-control",
|
|
11
12
|
"license": "MIT",
|
|
12
13
|
"keywords": [
|
|
13
14
|
"chatbot",
|