From f9a7f0cbd9d5de9a0fb3f50a2887cc3e3d85ac98 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 8 Nov 2024 21:42:21 +0000 Subject: [PATCH] fix: accepting a close request after a restart --- src/lib/tickets/manager.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/tickets/manager.js b/src/lib/tickets/manager.js index 06dbaa0..7e70ab6 100644 --- a/src/lib/tickets/manager.js +++ b/src/lib/tickets/manager.js @@ -1140,7 +1140,6 @@ module.exports = class TicketManager { */ async acceptClose(interaction) { const ticket = await this.getTicket(interaction.channel.id); - const $ticket = this.$stale.get(interaction.channel.id); const getMessage = this.client.i18n.getLocale(ticket.guild.locale); await interaction.editReply({ embeds: [ @@ -1154,7 +1153,7 @@ module.exports = class TicketManager { ], }); await new Promise(resolve => setTimeout(resolve, 5000)); - await this.finallyClose(interaction.channel.id, $ticket); + await this.finallyClose(interaction.channel.id, this.$stale.get(interaction.channel.id) || {}); } /**