Reverted timestamp changes

This commit is contained in:
Essem 2021-08-01 06:31:11 -05:00
parent 84e3b13922
commit ac1ff1e923
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ class ServerInfoCommand extends Command {
},
{
"name": "🗓 **Created on:**",
"value": `<t:${this.message.channel.guild.createdAt}:F>`
"value": new Date(this.message.channel.guild.createdAt).toString()
},
{
"name": "👥 **Users:**",

View file

@ -4,7 +4,7 @@ class SnowflakeCommand extends Command {
async run() {
if (!this.args[0]) return "You need to provide a snowflake ID!";
if (!this.args[0].match(/^<?[@#]?[&!]?\d+>?$/) && this.args[0] < 21154535154122752) return "That's not a valid snowflake!";
return `<t:${(this.args[0].replaceAll("@", "").replaceAll("#", "").replaceAll("!", "").replaceAll("&", "").replaceAll("<", "").replaceAll(">", "") / 4194304) + 1420070400000}:F`;
return new Date((this.args[0].replaceAll("@", "").replaceAll("#", "").replaceAll("!", "").replaceAll("&", "").replaceAll("<", "").replaceAll(">", "") / 4194304) + 1420070400000).toUTCString();
}
static description = "Converts a Discord snowflake id into a timestamp";

View file

@ -38,11 +38,11 @@ class UserInfoCommand extends Command {
},
{
"name": "🗓️ **Joined Discord on:**",
"value": `<t:${user.createdAt}:F>`
"value": new Date(user.createdAt).toString()
},
{
"name": "💬 **Joined this server on:**",
"value": member ? `<t:${member.joinedAt}:F>` : "N/A"
"value": member ? new Date(member.joinedAt).toString() : "N/A"
}
]
}