mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-23 13:44:59 +05:00
fix birthdays
This commit is contained in:
parent
5a7088671f
commit
e5c6659de5
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ async function checkBirthdays(client) {
|
||||||
for (const user of users) {
|
for (const user of users) {
|
||||||
if (!guild.members.cache.has(user.id)) continue;
|
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 day = userDate.getDate();
|
||||||
const month = userDate.getMonth() + 1;
|
const month = userDate.getMonth() + 1;
|
||||||
const year = userDate.getFullYear();
|
const year = userDate.getFullYear();
|
||||||
|
|
Loading…
Reference in a new issue