koishi-plugin-ccb-plus 0.2.9 → 1.0.0-alpha.0

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 +2 -8
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -224,14 +224,8 @@ var CcbState = class _CcbState {
224
224
  return String(atEl.attrs.id);
225
225
  }
226
226
  } catch (e) {
227
- }
228
- const atMatch = input.match(/<at\s+[^<]*?id=(["'])(.*?)\1/i);
229
- if (atMatch) return atMatch[2];
230
- if (/<at\b/i.test(input)) {
231
- const atEl = session.elements?.find((el) => el.type === "at");
232
- if (atEl?.attrs?.id) {
233
- return String(atEl.attrs.id);
234
- }
227
+ const atMatch = input.match(/<at\s+(?:.*?\s+)?id=(["'])(.*?)\1/i);
228
+ if (atMatch) return atMatch[2];
235
229
  }
236
230
  const colonIndex = input.indexOf(":");
237
231
  if (colonIndex > 0 && colonIndex < input.length - 1) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ccb-plus",
3
3
  "description": "Koishi 插件,与群友发生 ccb 行为。(移植自 astrbot_plugin_ccb_plus )",
4
- "version": "0.2.9",
4
+ "version": "1.0.0-alpha.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -18,6 +18,6 @@
18
18
  "group"
19
19
  ],
20
20
  "peerDependencies": {
21
- "koishi": "^4.18.10"
21
+ "koishi": "^4.18.7"
22
22
  }
23
23
  }