From a944095f4963492d98526597cdc9e3f23722d72b Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 22:42:19 -0500 Subject: [PATCH] Make dates human-readable --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f2a71d8..2d36a21 100644 --- a/index.js +++ b/index.js @@ -143,8 +143,8 @@ async function userInfo(message) { .setAuthor(member.user.tag, member.user.avatarURL()) .addField("Roles", member.roles.cache.map(r => `${r}`).join(' • ')) .addField("Permissions", member.permissions.toArray().map(p => `\`${p}\``.toLowerCase()).join(' • ')) - .addField("Joined at", member.joinedTimestamp, true) - .addField("Account created", member.user.createdTimestamp, true) + .addField("Joined at", `${new Date(member.joinedTimestamp * 1000).toLocaleString("en-US", {timeZoneName: "short"})}`, true) + .addField("Account created", `${new Date(member.user.createdTimestamp * 1000).toLocaleString("en-US", {timeZoneName: "short"})}`, true) .setColor("00c5ff") .setFooter(`User ID: ${member.user.id}`) .setTimestamp();