mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-01-10 18:06:27 +02:00
fix: log ticket closure even when there is no closer
This commit is contained in:
parent
508a3932fc
commit
412c65c0ff
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user