From 9e0705cbc39f1be4b03a3cad5e2d216b7d1be4e9 Mon Sep 17 00:00:00 2001 From: rei2hu Date: Fri, 18 Oct 2019 04:55:35 -0500 Subject: [PATCH] fix(Message): check for edited_timestamp in data when patching message (#3535) * check for data.edited_timestamp * actually i should do it like this for consistency * indentation --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 8a9df07ea..b09f1d348 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -219,7 +219,7 @@ class Message extends Base { const clone = this._clone(); this._edits.unshift(clone); - this.editedTimestamp = new Date(data.edited_timestamp).getTime(); + if ('edited_timestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime(); if ('content' in data) this.content = data.content; if ('pinned' in data) this.pinned = data.pinned; if ('tts' in data) this.tts = data.tts;