From 09120c8799762f7a940f803095f6f0ec91db4aa3 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 9 Sep 2021 22:10:39 -0400 Subject: added some timestamps --- src/commands/info/guildInfo.ts | 2 +- src/commands/info/snowflake.ts | 2 +- src/commands/info/userInfo.ts | 6 +++--- src/commands/moderation/modlog.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/commands') diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index f70b741..f1db783 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -105,7 +105,7 @@ export default class GuildInfoCommand extends BushCommand { guildAbout.push( `**Owner:** ${guild.members.cache.get(guild.ownerId)?.user.tag}`, - `**Created** ${guild.createdAt.toLocaleString()} (${util.dateDelta(guild.createdAt)})`, + `**Created** ${util.timestamp(guild.createdAt)} (${util.dateDelta(guild.createdAt)})`, `**Members:** ${guild.memberCount.toLocaleString() ?? 0} (${util.emojis.onlineCircle} ${ guild.approximatePresenceCount?.toLocaleString() ?? 0 }, ${util.emojis.offlineCircle} ${(guild.memberCount - (guild.approximatePresenceCount ?? 0)).toLocaleString() ?? 0})`, diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts index 8d6129b..df11bce 100644 --- a/src/commands/info/snowflake.ts +++ b/src/commands/info/snowflake.ts @@ -139,7 +139,7 @@ export default class SnowflakeCommand extends BushCommand { const deconstructedSnowflake: DeconstructedSnowflake = SnowflakeUtil.deconstruct(snowflake); const snowflakeInfo = [ `**Timestamp:** ${deconstructedSnowflake.timestamp}`, - `**Created:** ${deconstructedSnowflake.date.toLocaleString()}`, + `**Created:** ${util.timestamp(deconstructedSnowflake.date)}`, `**Worker ID:** ${deconstructedSnowflake.workerId}`, `**Process ID:** ${deconstructedSnowflake.processId}`, `**Increment:** ${deconstructedSnowflake.increment}` diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 745dcf0..98ef3ae 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -85,11 +85,11 @@ export default class UserInfoCommand extends BushCommand { else if (member?.permissions.has('ADMINISTRATOR')) emojis.push(client.consts.mappings.otherEmojis.ADMIN); if (member?.premiumSinceTimestamp) emojis.push(client.consts.mappings.otherEmojis.BOOSTER); - const createdAt = user.createdAt.toLocaleString(), + const createdAt = util.timestamp(user.createdAt), createdAtDelta = util.dateDelta(user.createdAt), - joinedAt = member?.joinedAt?.toLocaleString(), + joinedAt = util.timestamp(member?.joinedAt), joinedAtDelta = member && member.joinedAt ? util.dateDelta(member.joinedAt, 2) : undefined, - premiumSince = member?.premiumSince?.toLocaleString(), + premiumSince = util.timestamp(member?.premiumSince), premiumSinceDelta = member && member.premiumSince ? util.dateDelta(member.premiumSince, 2) : undefined; // General Info diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index d1a3900..c72ff39 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -53,7 +53,7 @@ export default class ModlogCommand extends BushCommand { modLog.push(`**Moderator**: <@!${log.moderator}>`); if (log.duration) modLog.push(`**Duration**: ${util.humanizeDuration(log.duration)}`); modLog.push(`**Reason**: ${trim(log.reason ?? 'No Reason Specified.')}`); - modLog.push(`**Date**: ${log.createdAt.toLocaleString()}`); + modLog.push(`**Date**: ${util.timestamp(log.createdAt)}`); if (log.evidence) modLog.push(`**Evidence:** ${trim(log.evidence)}`); return modLog.join(`\n`); } -- cgit