Skip to content

Commit

Permalink
fix(GuildMember): correctly check for premium_since (#5312)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotSugden committed Apr 14, 2021
1 parent eb43ce4 commit aff3625
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/structures/GuildMember.js
Expand Up @@ -85,7 +85,9 @@ class GuildMember extends Base {

if ('nick' in data) this.nickname = data.nick;
if ('joined_at' in data) this.joinedTimestamp = new Date(data.joined_at).getTime();
if ('premium_since' in data) this.premiumSinceTimestamp = new Date(data.premium_since).getTime();
if ('premium_since' in data) {
this.premiumSinceTimestamp = data.premium_since === null ? null : new Date(data.premium_since).getTime();
}
if ('roles' in data) this._roles = data.roles;
this.pending = data.pending ?? false;
}
Expand Down

0 comments on commit aff3625

Please sign in to comment.