From 7faf35098270ad9839fb9b570da1d0bddfe53e6a Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Mon, 4 Nov 2024 17:12:17 +0600 Subject: [PATCH] fix: handle null case Co-authored-by: Vlad Frangu --- packages/discord.js/src/structures/PartialGroupDMChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/PartialGroupDMChannel.js b/packages/discord.js/src/structures/PartialGroupDMChannel.js index 0e2bff1244f6..144c2091bbd2 100644 --- a/packages/discord.js/src/structures/PartialGroupDMChannel.js +++ b/packages/discord.js/src/structures/PartialGroupDMChannel.js @@ -72,7 +72,7 @@ class PartialGroupDMChannel extends BaseChannel { * The timestamp when the last pinned message was pinned, if there was one * @type {?number} */ - this.lastPinTimestamp = Date.parse(data.last_pin_timestamp); + this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; } else { this.lastPinTimestamp ??= null; }