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}` : '');
|
await channel.delete('Ticket closed' + (member ? ` by ${member.displayName}` : '') + reason ? `: ${reason}` : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (closedBy) {
|
logTicketEvent(this.client, {
|
||||||
logTicketEvent(this.client, {
|
action: 'close',
|
||||||
action: 'close',
|
target: {
|
||||||
target: {
|
id: ticket.id,
|
||||||
id: ticket.id,
|
name: `${ticket.category.name} **#${ticket.number}**`,
|
||||||
name: `${ticket.category.name} **#${ticket.number}**`,
|
},
|
||||||
},
|
userId: closedBy || this.client.user.id,
|
||||||
userId: closedBy,
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const creator = channel?.guild.members.cache.get(ticket.createdById);
|
const creator = channel?.guild.members.cache.get(ticket.createdById);
|
||||||
|
Loading…
Reference in New Issue
Block a user