koishi-plugin-booth-get 5.2.7 → 5.2.8

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.
Files changed (2) hide show
  1. package/lib/index.js +3 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -33,17 +33,15 @@ var inject = ["puppeteer"];
33
33
  var Config = import_koishi.Schema.object({
34
34
  loadTimeout: import_koishi.Schema.natural().role("ms").description("加载页面的最长时间").default(import_koishi.Time.second * 10),
35
35
  idleTimeout: import_koishi.Schema.natural().role("ms").description("等待页面空闲的最长时间").default(import_koishi.Time.second * 30),
36
- proxyServer: import_booth.Schema.string().description("代理服务器地址").default("61.216.156.222:60808"),
36
+ proxyServer: import_koishi.Schema.string().description("代理服务器地址").default("61.216.156.222:60808"),
37
37
  enableR18Check: import_koishi.Schema.boolean().description("启用R18内容检测").default(true),
38
- r18Tags: import_koishi.Schema.array(String).description("R18标签列表").default(["R-18", "R18", "成人向け", "NSFW", "18禁"])
38
+ r18Tags: import_koishi.Schema.array(import_koishi.Schema.string()).description("R18标签").default(["r18", "18禁", "R-18", "R18+", "R-18+", "R18G", "R-18G", "R18G+", "R-18G+", "R18G++", "R-18G++", "R18G+++", "R-18G+++", "R18G++++", "R-18G++++",])
39
39
 
40
40
  }).description("booth-get");
41
41
 
42
- // R18内容检测函数
43
42
  function checkR18(item, config) {
44
43
  if (!config.enableR18Check) return false;
45
44
 
46
- // 检查标签
47
45
  if (item.tags && Array.isArray(item.tags)) {
48
46
  const hasR18Tag = item.tags.some(tag =>
49
47
  config.r18Tags.some(r18Tag =>
@@ -53,15 +51,13 @@ function checkR18(item, config) {
53
51
  if (hasR18Tag) return true;
54
52
  }
55
53
 
56
- // 检查标题
57
54
  if (item.title) {
58
55
  const hasR18InTitle = config.r18Tags.some(r18Tag =>
59
56
  item.title.toLowerCase().includes(r18Tag.toLowerCase())
60
57
  );
61
58
  if (hasR18InTitle) return true;
62
59
  }
63
-
64
- // 检查描述
60
+
65
61
  if (item.description) {
66
62
  const hasR18InDesc = config.r18Tags.some(r18Tag =>
67
63
  item.description.toLowerCase().includes(r18Tag.toLowerCase())
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-booth-get",
3
3
  "description": "通过url与名称检查摊位物品并反馈用户搜索的图片",
4
- "version": "5.2.7",
4
+ "version": "5.2.8",
5
5
  "contributors": [
6
6
  "rixiang <1148147857@qq.com>"
7
7
  ],