mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Made date/timestamps consistent and less shitty
This commit is contained in:
@@ -92,23 +92,20 @@ class Invite {
|
||||
*/
|
||||
this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);
|
||||
|
||||
this._createdAt = new Date(data.created_at).getTime();
|
||||
/**
|
||||
* The timestamp the invite was created at
|
||||
* @type {number}
|
||||
*/
|
||||
this.createdTimestamp = new Date(data.created_at).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* The creation date of the invite
|
||||
* The time the invite was created
|
||||
* @type {Date}
|
||||
* @readonly
|
||||
*/
|
||||
get createdAt() {
|
||||
return new Date(this._createdAt);
|
||||
}
|
||||
|
||||
/**
|
||||
* The creation date of the invite
|
||||
* @type {Date}
|
||||
*/
|
||||
get creationDate() {
|
||||
return new Date(this._createdAt);
|
||||
return new Date(this.createdTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user