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