Skip to content

Commit

Permalink
fix: log ticket closure even when there is no closer
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Nov 9, 2024
1 parent 508a393 commit 412c65c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/lib/tickets/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 412c65c

Please sign in to comment.