From 1538b25ee55b998f472882621fc054e3641654b5 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Fri, 5 Jun 2020 17:06:15 +0300 Subject: [PATCH] Fix error when receiving a reply to a thread that has had its channel deleted --- src/data/Thread.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/Thread.js b/src/data/Thread.js index 960b567..3d686fa 100644 --- a/src/data/Thread.js +++ b/src/data/Thread.js @@ -360,7 +360,7 @@ class Thread { // Show user reply in the inbox thread const inboxContent = this._formatUserReplyThreadMessage(msg.author, msg.content, msg.embeds, threadFormattedAttachments, null); const inboxMessage = await this._postToThreadChannel(inboxContent, attachmentFiles); - await this._updateThreadMessage(threadMessage.id, { inbox_message_id: inboxMessage.id }); + if (inboxMessage) await this._updateThreadMessage(threadMessage.id, { inbox_message_id: inboxMessage.id }); // Interrupt scheduled closing, if in progress if (this.scheduled_close_at) {