From 412c65c0ff63829c760eb874b36905d41f105581 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sat, 9 Nov 2024 00:08:14 +0000 Subject: [PATCH] fix: log ticket closure even when there is no closer --- src/lib/tickets/manager.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/lib/tickets/manager.js b/src/lib/tickets/manager.js index 67873f5..faabe35 100644 --- a/src/lib/tickets/manager.js +++ b/src/lib/tickets/manager.js @@ -1210,16 +1210,14 @@ module.exports = class TicketManager { await channel.delete('Ticket closed' + (member ? ` by ${member.displayName}` : '') + reason ? `: ${reason}` : ''); } - if (closedBy) { - logTicketEvent(this.client, { - action: 'close', - target: { - id: ticket.id, - name: `${ticket.category.name} **#${ticket.number}**`, - }, - userId: closedBy, - }); - } + logTicketEvent(this.client, { + action: 'close', + target: { + id: ticket.id, + name: `${ticket.category.name} **#${ticket.number}**`, + }, + userId: closedBy || this.client.user.id, + }); try { const creator = channel?.guild.members.cache.get(ticket.createdById);