fix: only send transcript button if archiving is enabled

This commit is contained in:
Isaac 2025-02-12 21:18:49 +00:00
parent 13f3427ba7
commit 618f35f247
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -631,20 +631,22 @@ module.exports = class TicketManager {
});
}
await channel.send({
components: [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId(JSON.stringify({
action: 'transcript',
ticket: referencesTicketId,
}))
.setStyle(ButtonStyle.Primary)
.setEmoji(getMessage('buttons.transcript.emoji'))
.setLabel(getMessage('buttons.transcript.text')),
components: category.guild.archive
? [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId(JSON.stringify({
action: 'transcript',
ticket: referencesTicketId,
}))
.setStyle(ButtonStyle.Primary)
.setEmoji(getMessage('buttons.transcript.emoji'))
.setLabel(getMessage('buttons.transcript.text')),
),
],
),
]
: [],
embeds: [embed],
});
}