abw.js
Version:
ABW is a foundation aimed at fighting malicious bots and self-bots on Discord so that users can browse the app without risk.
22 lines (18 loc) • 554 B
JavaScript
const axios = require('axios');
const ErrorsManager = require('../Client/Errors/index');
async function check(id, token) {
try {
const response = await axios.get(`http://panel.myheberg.cloud:2004/check/${id}`, {
headers: {
Authorization: token
}
});
if (response.data.isUnsafe !== true && response.data.isUnsafe !== false) {
throw new Error("Invalid API response");
}
return response.data.isUnsafe;
} catch (error) {
ErrorsManager.handle(error);
}
}
module.exports = check;