mirror of
https://github.com/danbulant/discord.js
synced 2026-06-17 05:31:19 +00:00
Patch timestamp of 0 on guild join date (#2041)
The Discord API seems to send a timestamp of 0 for the joined_at on presence updates. This patch resolves this by ignoring timestamps of 0.
This commit is contained in:
parent
6b249ba454
commit
8d7e745ee8
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ class GuildMember extends Base {
|
|||
* @type {number}
|
||||
* @name GuildMember#joinedTimestamp
|
||||
*/
|
||||
if (typeof data.joined_at !== 'undefined') this.joinedTimestamp = new Date(data.joined_at).getTime();
|
||||
if (data.joined_at) this.joinedTimestamp = new Date(data.joined_at).getTime();
|
||||
|
||||
this.user = this.guild.client.users.create(data.user);
|
||||
if (data.roles) this._roles = data.roles;
|
||||
|
|
|
|||
Loading…
Reference in a new issue