From c5f092ce2f58b155807fec14f7b3c49fbf8ff555 Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 9 Feb 2023 17:40:25 +0000 Subject: [PATCH] refactor --- src/listeners/client/channelDelete.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/listeners/client/channelDelete.js b/src/listeners/client/channelDelete.js index b371997..712cd92 100644 --- a/src/listeners/client/channelDelete.js +++ b/src/listeners/client/channelDelete.js @@ -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`); + } } };