Reverted timestamp changes
This commit is contained in:
parent
84e3b13922
commit
ac1ff1e923
3 changed files with 4 additions and 4 deletions
|
@ -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:**",
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue