fix checks

This commit is contained in:
ExtrasContainer
2024-02-05 18:50:26 +00:00
parent c43ff702be
commit 9d3db21bb2
+5 -5
View File
@@ -21,11 +21,11 @@ async function dangercordcheckVerification(userId, accessToken) {
return 1; // Allowed to continue
} else {
// Determine if report level is acceptable
if (userData.reports <= 2 || userData.last_reported < Date.now() - (30 * 24 * 60 * 60 * 1000)) {
return 1; // Allowed to continue
} else {
return 0; // Not allowed to continue
}
if (userData.reports >= 2 && userData.last_reported >= Date.now() - (30 * 24 * 60 * 60 * 1000)) {
return 0; // Not allowed to continue
} else {
return 1; // Allowed to continue
}
}
} catch (error) {
console.error('Error fetching user data:', error);