From 3afa12574ad4ea585657917608f91b29034ad465 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:00:52 +0700 Subject: [PATCH] Update ThreadChannel.js --- src/structures/ThreadChannel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/ThreadChannel.js b/src/structures/ThreadChannel.js index 27a0c81..f5ab085 100644 --- a/src/structures/ThreadChannel.js +++ b/src/structures/ThreadChannel.js @@ -107,7 +107,9 @@ class ThreadChannel extends Channel { * created * @type {?number} */ - this.archiveTimestamp = new Date(data.thread_metadata.archive_timestamp).getTime(); + this.archiveTimestamp = data.thread_metadata?.archive_timestamp + ? Date.parse(data.thread_metadata.archive_timestamp) + : null; if ('create_timestamp' in data.thread_metadata) { // Note: this is needed because we can't assign directly to getters