-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_conf_schema.json
More file actions
316 lines (316 loc) · 11.5 KB
/
_conf_schema.json
File metadata and controls
316 lines (316 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
{
"baidu_audit": {
"description": "百度云审核API配置",
"type": "object",
"items": {
"api_key": {
"description": "百度云API Key",
"type": "string",
"hint": "必填项,从百度云控制台获取"
},
"secret_key": {
"description": "百度云Secret Key",
"type": "string",
"hint": "必填项,从百度云控制台获取"
},
"strategy_id": {
"description": "自定义审核策略ID",
"type": "string",
"hint": "可选,在百度云内容审核后台设置的自定义策略ID"
},
"access_token_expire": {
"description": "AccessToken有效期(秒)",
"type": "int",
"default": 86400,
"hint": "默认24小时,建议保持默认值"
}
}
},
"enabled_groups": {
"description": "启用插件的群号列表",
"type": "list",
"default": [],
"hint": "填入需要开启审核的群号(纯数字)。如果留空(默认),则不对任何群进行审核。"
},
"enable_text_censor": {
"description": "是否启用文本审核",
"type": "bool",
"default": true,
"hint": "启用后将对文本消息进行审核"
},
"enable_image_censor": {
"description": "是否启用图片审核",
"type": "bool",
"default": true,
"hint": "启用后将对图片消息进行审核"
},
"log_level": {
"description": "日志级别",
"type": "string",
"default": "INFO",
"hint": "DEBUG/INFO/WARNING/ERROR"
},
"disposal": {
"description": "审核处置配置",
"type": "object",
"items": {
"default": {
"description": "默认全局配置",
"type": "object",
"items": {
"notify_group_id": {
"description": "默认通知群号",
"type": "string",
"hint": "所有未自定义配置的群共用此通知群"
},
"admin_id": {
"description": "管理员账号",
"type": "string",
"hint": "审核失败时私聊通知管理员账号"
},
"single_user_violation_threshold": {
"description": "单人短时间违规次数阈值",
"type": "int",
"default": 3,
"hint": "默认3次触发禁言,设置为0表示不启用单人禁言功能"
},
"group_violation_threshold": {
"description": "群内短时间违规次数阈值",
"type": "int",
"default": 5,
"hint": "默认5次触发全员禁言,设置为0表示不启用全员禁言功能"
},
"time_window": {
"description": "统计时间窗口(秒)",
"type": "int",
"default": 300,
"hint": "默认5分钟=300秒"
},
"mute_duration": {
"description": "单人禁言时长(秒)",
"type": "int",
"default": 86400,
"hint": "默认1天=86400秒"
},
"kick_user": {
"description": "是否启用踢人",
"type": "bool",
"default": false,
"hint": "是否在达到阈值后踢出用户"
},
"kick_user_threshold": {
"description": "踢人阈值",
"type": "int",
"default": 5,
"hint": "用户发送几条违规消息后执行踢群,设置为0表示不启用踢人功能"
},
"is_kick_user_and_block": {
"description": "是否踢出并拉黑用户",
"type": "bool",
"default": false,
"hint": "是否在踢出用户的同时加入黑名单"
}
}
},
"group_custom": {
"description": "群级别自定义配置",
"type": "template_list",
"hint": "为不同的群配置不同的审核参数。可以在 WebUI 上快速添加和编辑群配置。",
"templates": {
"default_group_config": {
"name": "默认群配置",
"hint": "适用于大多数群的标准配置",
"items": {
"group_id": {
"description": "群号",
"type": "string",
"hint": "要配置的群号(纯数字)"
},
"notify_group_id": {
"description": "通知群号",
"type": "string",
"hint": "违规内容通知群号"
},
"rule_id": {
"description": "审核策略ID",
"type": "string",
"default": "default",
"hint": "群聊审核策略ID,请在百度云内容审核后台创建并设置规则"
},
"single_user_violation_threshold": {
"description": "单人违规阈值",
"type": "int",
"default": 3,
"hint": "单人短时间违规次数阈值,默认3次触发禁言"
},
"group_violation_threshold": {
"description": "群违规阈值",
"type": "int",
"default": 5,
"hint": "群内短时间违规次数阈值,默认5次触发全员禁言"
},
"time_window": {
"description": "时间窗口(秒)",
"type": "int",
"default": 300,
"hint": "统计时间窗口,默认5分钟=300秒"
},
"mute_duration": {
"description": "禁言时长(秒)",
"type": "int",
"default": 86400,
"hint": "单人禁言时长,默认1天=86400秒"
},
"kick_user": {
"description": "是否启用踢人",
"type": "bool",
"default": false,
"hint": "是否在达到阈值后踢出用户"
},
"kick_user_threshold": {
"description": "踢人阈值",
"type": "int",
"default": 5,
"hint": "用户发送几条违规消息后执行踢群"
},
"is_kick_user_and_block": {
"description": "是否踢出并拉黑用户",
"type": "bool",
"default": false,
"hint": "是否在踢出用户的同时加入黑名单"
}
}
},
"strict_config": {
"name": "严格配置",
"hint": "适用于需要严格管理的群",
"items": {
"group_id": {
"description": "群号",
"type": "string",
"hint": "要配置的群号(纯数字)"
},
"notify_group_id": {
"description": "通知群号",
"type": "string",
"hint": "违规内容通知群号"
},
"rule_id": {
"description": "审核策略ID",
"type": "string",
"default": "default",
"hint": "群聊审核策略ID,请在百度云内容审核后台创建并设置规则"
},
"single_user_violation_threshold": {
"description": "单人违规阈值",
"type": "int",
"default": 2,
"hint": "单人短时间违规次数阈值,默认2次触发禁言"
},
"group_violation_threshold": {
"description": "群违规阈值",
"type": "int",
"default": 4,
"hint": "群内短时间违规次数阈值,默认4次触发全员禁言"
},
"time_window": {
"description": "时间窗口(秒)",
"type": "int",
"default": 600,
"hint": "统计时间窗口,默认10分钟=600秒"
},
"mute_duration": {
"description": "禁言时长(秒)",
"type": "int",
"default": 43200,
"hint": "单人禁言时长,默认12小时=43200秒"
},
"kick_user": {
"description": "是否启用踢人",
"type": "bool",
"default": true,
"hint": "是否在达到阈值后踢出用户"
},
"kick_user_threshold": {
"description": "踢人阈值",
"type": "int",
"default": 3,
"hint": "用户发送几条违规消息后执行踢群"
},
"is_kick_user_and_block": {
"description": "是否踢出并拉黑用户",
"type": "bool",
"default": true,
"hint": "是否在踢出用户的同时加入黑名单"
}
}
},
"lenient_config": {
"name": "宽松配置",
"hint": "适用于管理宽松的群",
"items": {
"group_id": {
"description": "群号",
"type": "string",
"hint": "要配置的群号(纯数字)"
},
"notify_group_id": {
"description": "通知群号",
"type": "string",
"hint": "违规内容通知群号"
},
"rule_id": {
"description": "审核策略ID",
"type": "string",
"default": "default",
"hint": "群聊审核策略ID,请在百度云内容审核后台创建并设置规则"
},
"single_user_violation_threshold": {
"description": "单人违规阈值",
"type": "int",
"default": 5,
"hint": "单人短时间违规次数阈值,默认5次触发禁言,设置为0表示不启用单人禁言功能"
},
"group_violation_threshold": {
"description": "群违规阈值",
"type": "int",
"default": 10,
"hint": "群内短时间违规次数阈值,默认10次触发全员禁言,设置为0表示不启用全员禁言功能"
},
"time_window": {
"description": "时间窗口(秒)",
"type": "int",
"default": 600,
"hint": "统计时间窗口,默认10分钟=600秒"
},
"mute_duration": {
"description": "禁言时长(秒)",
"type": "int",
"default": 3600,
"hint": "单人禁言时长,默认1小时=3600秒"
},
"kick_user": {
"description": "是否启用踢人",
"type": "bool",
"default": false,
"hint": "是否在达到阈值后踢出用户"
},
"kick_user_threshold": {
"description": "踢人阈值",
"type": "int",
"default": 10,
"hint": "用户发送几条违规消息后执行踢群,设置为0表示不启用踢人功能。"
},
"is_kick_user_and_block": {
"description": "是否踢出并拉黑用户",
"type": "bool",
"default": false,
"hint": "是否在踢出用户的同时加入黑名单"
}
}
}
}
}
}
}
}