fix edit topic log

This commit is contained in:
Isaac 2022-09-06 00:16:07 +01:00
parent 75be93db77
commit 98dca5b974
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -29,6 +29,7 @@ module.exports = class TopicModal extends Modal {
}, },
id: true, id: true,
openingMessageId: true, openingMessageId: true,
topic: true,
}; };
const original = await client.prisma.ticket.findUnique({ const original = await client.prisma.ticket.findUnique({
select, select,
@ -41,7 +42,7 @@ module.exports = class TopicModal extends Modal {
}); });
const getMessage = client.i18n.getLocale(ticket.guild.locale); const getMessage = client.i18n.getLocale(ticket.guild.locale);
if (topic) await interaction.channel.setTopic(`<@${ticket.createdById}> | ${topic}`); if (topic) interaction.channel.setTopic(`<@${ticket.createdById}> | ${topic}`);
const opening = await interaction.channel.messages.fetch(ticket.openingMessageId); const opening = await interaction.channel.messages.fetch(ticket.openingMessageId);
if (opening && opening.embeds.length >= 2) { if (opening && opening.embeds.length >= 2) {