mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-04 01:11:27 +03:00
fix: only send transcript button in log channel if archiving is enabled
This commit is contained in:
@@ -187,7 +187,7 @@ async function logTicketEvent(client, {
|
||||
|
||||
return await channel.send({
|
||||
components:
|
||||
action === 'close' ? [
|
||||
action === 'close' && target.archive ? [
|
||||
new ActionRowBuilder()
|
||||
.addComponents(
|
||||
new ButtonBuilder()
|
||||
|
@@ -1261,6 +1261,7 @@ module.exports = class TicketManager {
|
||||
logTicketEvent(this.client, {
|
||||
action: 'close',
|
||||
target: {
|
||||
archive: ticket.guild.archive,
|
||||
id: ticket.id,
|
||||
name: `${ticket.category.name} **#${ticket.number}**`,
|
||||
},
|
||||
|
Reference in New Issue
Block a user