fix: log ticket closure even when there is no closer

This commit is contained in:
Isaac 2024-11-09 00:08:14 +00:00
parent 508a3932fc
commit 412c65c0ff
No known key found for this signature in database
GPG Key ID: 17700D08381EA590

View File

@ -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,
userId: closedBy || this.client.user.id,
});
}
try {
const creator = channel?.guild.members.cache.get(ticket.createdById);