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:
@@ -82,9 +82,23 @@ class GuildMember {
|
||||
*/
|
||||
this.nickname = data.nick || null;
|
||||
|
||||
/**
|
||||
* The timestamp the member joined the guild at
|
||||
* @type {number}
|
||||
*/
|
||||
this.joinedTimestamp = new Date(data.joined_at).getTime();
|
||||
|
||||
this.user = data.user;
|
||||
this._roles = data.roles;
|
||||
this._joinDate = new Date(data.joined_at).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* The time the member joined the guild
|
||||
* @type {Date}
|
||||
* @readonly
|
||||
*/
|
||||
get joinedAt() {
|
||||
return new Date(this.joinedTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,14 +110,6 @@ class GuildMember {
|
||||
return this.guild.presences.get(this.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* The date this member joined the guild
|
||||
* @type {Date}
|
||||
*/
|
||||
get joinDate() {
|
||||
return new Date(this._joinDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of roles that are applied to this GuildMember, mapped by the role ID.
|
||||
* @type {Collection<string, Role>}
|
||||
|
||||
Reference in New Issue
Block a user