mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02:00
fix: don't close tickets twice
This commit is contained in:
parent
0b44465024
commit
a73cc2bdd4
@ -18,7 +18,7 @@ module.exports = class extends Listener {
|
||||
where: { id: channel.id },
|
||||
});
|
||||
|
||||
if (!ticket?.open) return;
|
||||
if (!ticket || 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`);
|
||||
|
Loading…
Reference in New Issue
Block a user