fix edit topic log

This commit is contained in:
Isaac 2022-09-06 00:16:07 +01:00
parent 3c8ba79b87
commit 3ee972c9ff
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,
openingMessageId: true,
topic: true,
};
const original = await client.prisma.ticket.findUnique({
select,
@ -41,7 +42,7 @@ module.exports = class TopicModal extends Modal {
});
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);
if (opening && opening.embeds.length >= 2) {