mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-06 02:01:26 +03:00
feat: transcript button in log channel
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user