mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02:00
refactor
This commit is contained in:
parent
d7ae5c0c9e
commit
c5f092ce2f
@ -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`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user