File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
packages/discord.js/src/structures Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ class GuildMember extends Base {
2424 */
2525 this . guild = guild ;
2626
27- /**
28- * The timestamp the member joined the guild at
29- * @type {?number }
30- */
31- this . joinedTimestamp = null ;
32-
3327 /**
3428 * The last timestamp this member started boosting the guild
3529 * @type {?number }
@@ -95,7 +89,17 @@ class GuildMember extends Base {
9589 this . banner ??= null ;
9690 }
9791
98- if ( 'joined_at' in data ) this . joinedTimestamp = Date . parse ( data . joined_at ) ;
92+ if ( 'joined_at' in data ) {
93+ /**
94+ * The timestamp the member joined the guild at
95+ *
96+ * @type {?number }
97+ */
98+ this . joinedTimestamp = data . joined_at && Date . parse ( data . joined_at ) ;
99+ } else {
100+ this . joinedTimestamp ??= null ;
101+ }
102+
99103 if ( 'premium_since' in data ) {
100104 this . premiumSinceTimestamp = data . premium_since ? Date . parse ( data . premium_since ) : null ;
101105 }
You can’t perform that action at this time.
0 commit comments