fix: rename language key for incorrect parameter type error

isekai-main
Julian Lam 3 years ago
parent e747998cba
commit aeb43b9bb1

@ -1,7 +1,7 @@
{
"invalid-data": "Invalid Data",
"invalid-json": "Invalid JSON",
"array-expected": "A value of type Array was expected for property `%1`, but %2 was received instead",
"wrong-parameter-type": "A value of type %3 was expected for property `%1`, but %2 was received instead",
"required-parameters-missing": "Required parameters were missing from this API call: %1",
"not-logged-in": "You don't seem to be logged in.",

@ -29,7 +29,7 @@ chatsAPI.create = async function (caller, data) {
}
if (!data.uids || !Array.isArray(data.uids)) {
throw new Error(`[[error:array-expected, uids, ${typeof data.uids}]]`);
throw new Error(`[[error:wrong-parameter-type, uids, ${typeof data.uids}, Array]]`);
}
await Promise.all(data.uids.map(async uid => messaging.canMessageUser(caller.uid, uid)));

Loading…
Cancel
Save