mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Reduce memory usage by dynamically creating Dates
This commit is contained in:
@@ -260,11 +260,7 @@ class Guild {
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.large = data.large;
|
||||
/**
|
||||
* The date at which the logged-in client joined the guild.
|
||||
* @type {Date}
|
||||
*/
|
||||
this.joinDate = new Date(data.joined_at);
|
||||
this._joinDate = new Date(data.joined_at).getTime();
|
||||
/**
|
||||
* The hash of the guild icon, or null if there is no icon.
|
||||
* @type {?String}
|
||||
@@ -359,6 +355,13 @@ class Guild {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The date at which the logged-in client joined the guild.
|
||||
* @type {Date}
|
||||
*/
|
||||
get joinDate() {
|
||||
return new Date(this._joinDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Channel in the Guild.
|
||||
|
||||
Reference in New Issue
Block a user