koishi-plugin-ccb-plus 0.2.8 → 0.2.9
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 +8 -2
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -224,8 +224,14 @@ var CcbState = class _CcbState {
|
|
|
224
224
|
return String(atEl.attrs.id);
|
|
225
225
|
}
|
|
226
226
|
} catch (e) {
|
|
227
|
-
|
|
228
|
-
|
|
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
|
+
}
|
|
229
235
|
}
|
|
230
236
|
const colonIndex = input.indexOf(":");
|
|
231
237
|
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.
|
|
4
|
+
"version": "0.2.9",
|
|
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.
|
|
21
|
+
"koishi": "^4.18.10"
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
}
|