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.
- package/lib/index.cjs +9 -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
|
-
|
|
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
|
}
|