This commit is contained in:
Isaac 2023-02-09 17:40:25 +00:00
parent d7ae5c0c9e
commit c5f092ce2f
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -18,9 +18,9 @@ module.exports = class extends Listener {
where: { id: channel.id },
});
if (!ticket?.open) return;
await client.tickets.finallyClose(ticket.id, { reason: 'channel deleted' });
this.client.log.info(`Closed ticket ${ticket.id} because the channel was deleted`);
if (ticket?.open) {
await client.tickets.finallyClose(ticket.id, { reason: 'channel deleted' });
this.client.log.info.tickets(`Closed ticket ${ticket.id} because the channel was deleted`);
}
}
};