From f7b5031aab46da2795e12805ec383b610bd4034f Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 11 Oct 2022 18:58:02 +0100 Subject: [PATCH] Add message reference (for replies) to archives --- src/lib/tickets/archiver.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/tickets/archiver.js b/src/lib/tickets/archiver.js index 80014d8..97bbf8f 100644 --- a/src/lib/tickets/archiver.js +++ b/src/lib/tickets/archiver.js @@ -96,6 +96,9 @@ module.exports = class TicketArchiver { }); } + let reference; + if (message.reference) reference = await message.fetchReference(); + const messageD = { author: { connect: { @@ -111,6 +114,7 @@ module.exports = class TicketArchiver { components: [...message.components.values()], content: message.content, embeds: message.embeds.map(embed => ({ ...embed })), + reference: reference ? reference.id : null, }), ), createdAt: message.createdAt,