From e5c6659de5ea3ef643ec7bee26402a78add04a37 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Wed, 20 Nov 2024 12:01:41 +0500 Subject: [PATCH] fix birthdays --- helpers/birthdays.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/birthdays.js b/helpers/birthdays.js index fd8ee570..2a8a57d3 100644 --- a/helpers/birthdays.js +++ b/helpers/birthdays.js @@ -21,7 +21,7 @@ async function checkBirthdays(client) { for (const user of users) { if (!guild.members.cache.has(user.id)) continue; - const userDate = user.birthdate > 9999999999 ? new Date(user.birthdate * 1000) : new Date(user.birthdate); + const userDate = new Date(user.birthdate).getFullYear() <= 1970 ? new Date(user.birthdate * 1000) : new Date(user.birthdate); const day = userDate.getDate(); const month = userDate.getMonth() + 1; const year = userDate.getFullYear();