From 1d08da3ee29b67b468f0902bc356be851a4a8cb8 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 14 May 2021 10:42:34 -0500 Subject: [PATCH] Test warning on newly created account join --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index dc05a5e..8694264 100644 --- a/bot.js +++ b/bot.js @@ -1498,7 +1498,7 @@ client.on('guildMemberAdd', member => { .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true, size: 1024 })) .addField("Tag", `${member.user.tag}`) .addField("Joined At", `${new Date(member.joinedTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) - .addField("Account Created", `${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) + .addField("Account Created", member.joinedTimestamp - member.user.createdTimestamp > 86000000 ? `${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}` : `⚠ ${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})} ⚠ (account created in the last 24 hours)`) .setFooter("Member ID: " + member.id) .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp()