From 8c4befad7b1c3604c66ab5720cacbcc0fe4b32c3 Mon Sep 17 00:00:00 2001 From: "Isaac (eartharoid)" Date: Tue, 25 Aug 2020 22:44:40 +0100 Subject: [PATCH] fixed embeds in archive --- src/events/messageUpdate.js | 3 ++- src/modules/archive.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/events/messageUpdate.js b/src/events/messageUpdate.js index 02452a1..e9ca608 100644 --- a/src/events/messageUpdate.js +++ b/src/events/messageUpdate.js @@ -38,7 +38,8 @@ module.exports = { let path = `user/transcripts/raw/${n.channel.id}.log`; let embeds = []; for (let embed in n.embeds) - embeds.push(n.embeds[embed].toJSON()); + // embeds.push(n.embeds[embed]); // n.embeds[embed].toJSON() + embeds[embed] = { ...n.embeds[embed] }; fs.appendFileSync(path, JSON.stringify({ id: n.id, diff --git a/src/modules/archive.js b/src/modules/archive.js index b1a96ea..80d3601 100644 --- a/src/modules/archive.js +++ b/src/modules/archive.js @@ -34,7 +34,8 @@ module.exports.add = (message) => { let embeds = []; for (let embed in message.embeds) - embeds.push(message.embeds[embed].toJSON()); + // embeds.push(message.embeds[embed]); // .toJSON() + embeds[embed] = { ...message.embeds[embed] }; // message fs.appendFileSync(raw, JSON.stringify({