fix checks
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user