Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit de26d9a

Browse files
authored
Update
Added Checkblacklist Function Added Ratelimit Error Message
1 parent 9e35726 commit de26d9a

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

src/KeyAuth.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,33 @@ async function check() {
260260
load_response_struct(json)
261261
}
262262

263+
async function checkblacklist() {
264+
checkinit();
265+
266+
await getHWID();
267+
const hwid = sys.hwid;
268+
269+
const values_to_upload = {
270+
'type': 'checkblacklist',
271+
'hwid': hwid,
272+
'sessionid': datastore.sessionid,
273+
'name': datastore.name,
274+
'ownerid': datastore.ownerid,
275+
}
276+
277+
const parameters = "?" + stringify(values_to_upload);
278+
279+
var response = await req(parameters);
280+
var json = response;
281+
282+
load_response_struct(json);
283+
if (json.success) {
284+
return true;
285+
} else {
286+
return false;
287+
}
288+
}
289+
263290
async function setvar(varname, data) {
264291
checkinit();
265292

@@ -499,7 +526,7 @@ async function getUSER() {
499526
}
500527
//#endregion
501528

502-
export { api, app_data, user_data, init, Login, Register, License, Upgrade, log, webhook, getvar, setvar, ban, download, variable, check } //KEYAUTH API
529+
export { api, app_data, user_data, init, Login, Register, License, Upgrade, log, webhook, getvar, setvar, ban, download, variable, check, checkblacklist } //KEYAUTH API
503530

504531
async function req(post_data) {
505532

@@ -511,6 +538,10 @@ async function req(post_data) {
511538
}
512539
})
513540
.then((res) => {
541+
if (res.status == 429) {
542+
error("Rate Limited! - KeyAuth");
543+
}
544+
514545
returndata = res.data;
515546
}).catch((err) => {
516547
console.error(err);

0 commit comments

Comments
 (0)