feat: transcript button in log channel

This commit is contained in:
Isaac
2024-11-09 00:08:39 +00:00
parent 412c65c0ff
commit 2a96858782
4 changed files with 48 additions and 3 deletions

View File

@@ -1,4 +1,7 @@
const {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
cleanCodeBlockContent,
EmbedBuilder,
} = require('discord.js');
@@ -182,7 +185,24 @@ async function logTicketEvent(client, {
);
}
return await channel.send({ embeds });
return await channel.send({
components:
action === 'close' ? [
new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId(JSON.stringify({
action: 'transcript',
ticket: target.id,
}))
.setStyle(ButtonStyle.Primary)
.setEmoji(getMessage('buttons.transcript.emoji'))
.setLabel(getMessage('buttons.transcript.text')),
),
] : [],
embeds,
});
}
/**