Some trickery.

This commit is contained in:
Kwafuri
2024-02-14 22:46:39 +00:00
parent 9d5af8c19f
commit 1abd19fb39
+2 -3
View File
@@ -6,12 +6,11 @@ async function newUserKicker(member) {
const threshold = db.newUserKickerThreshold;
const accountAge = (Date.now() - member.user.createdAt) / (1000 * 60 * 60 * 24);
console.log(`Account age of ${member.user.tag}: ${accountAge} days.`);
if (accountAge <= threshold) {
member.kick('Account age is less than the threshold.');
console.log(`Account age of ${member.user.tag} is less than the threshold. Kicked.`);
console.log(`Account age of ${member.user.tag} is ${accountAge.toFixed(0)} day(s) which is lower than the threshold. Kicked.`);
} else {
console.log(`Account age of ${member.user.tag} is greater than the threshold. Not kicked.`);
console.log(`Account age of ${member.user.tag} is ${accountAge.toFixed(0)} day(s) which is higher than the threshold. Not kicked.`);
}
return;