fix: accepting a close request after a restart

This commit is contained in:
Isaac 2024-11-08 21:42:21 +00:00
parent 519f9f4e6d
commit f9a7f0cbd9
No known key found for this signature in database
GPG Key ID: 17700D08381EA590

View File

@ -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) || {});
}
/**