mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Made date/timestamps consistent and less shitty
This commit is contained in:
@@ -51,12 +51,21 @@ class Emoji {
|
||||
}
|
||||
|
||||
/**
|
||||
* The time the emoji was created
|
||||
* The timestamp the emoji was created at
|
||||
* @type {number}
|
||||
* @readonly
|
||||
* @type {Date}
|
||||
*/
|
||||
get creationDate() {
|
||||
return new Date((this.id / 4194304) + 1420070400000);
|
||||
get createdTimestamp() {
|
||||
return (this.id / 4194304) + 1420070400000;
|
||||
}
|
||||
|
||||
/**
|
||||
* The time the emoji was created
|
||||
* @type {Date}
|
||||
* @readonly
|
||||
*/
|
||||
get createdAt() {
|
||||
return new Date(this.createdTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user