koishi-plugin-echo-cave 1.16.13 → 1.16.15

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.cjs +9 -2
  2. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -172,11 +172,18 @@ function parseUserIds(userIds) {
172
172
  try {
173
173
  const element = import_koishi.h.parse(userId);
174
174
  if (element.length === 1 && element[0].type === "at") {
175
- parsedUserIds.push(element[0].attrs.id);
175
+ const userId2 = element[0].attrs.id;
176
+ if (userId2 === "all") {
177
+ return {
178
+ parsedUserIds: [],
179
+ error: "invalid_all_mention"
180
+ };
181
+ }
182
+ parsedUserIds.push(userId2);
176
183
  }
177
184
  } catch (e) {
178
185
  const num = Number(userId);
179
- if (Number.isNaN(num)) {
186
+ if (!Number.isNaN(num)) {
180
187
  parsedUserIds.push(userId);
181
188
  }
182
189
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-echo-cave",
3
3
  "description": "Group echo cave",
4
- "version": "1.16.13",
4
+ "version": "1.16.15",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",