mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Add message reference (for replies) to archives
This commit is contained in:
parent
54506cf422
commit
f7b5031aab
@ -96,6 +96,9 @@ module.exports = class TicketArchiver {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let reference;
|
||||||
|
if (message.reference) reference = await message.fetchReference();
|
||||||
|
|
||||||
const messageD = {
|
const messageD = {
|
||||||
author: {
|
author: {
|
||||||
connect: {
|
connect: {
|
||||||
@ -111,6 +114,7 @@ module.exports = class TicketArchiver {
|
|||||||
components: [...message.components.values()],
|
components: [...message.components.values()],
|
||||||
content: message.content,
|
content: message.content,
|
||||||
embeds: message.embeds.map(embed => ({ ...embed })),
|
embeds: message.embeds.map(embed => ({ ...embed })),
|
||||||
|
reference: reference ? reference.id : null,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
createdAt: message.createdAt,
|
createdAt: message.createdAt,
|
||||||
|
Loading…
Reference in New Issue
Block a user