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) { async acceptClose(interaction) {
const ticket = await this.getTicket(interaction.channel.id); 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); const getMessage = this.client.i18n.getLocale(ticket.guild.locale);
await interaction.editReply({ await interaction.editReply({
embeds: [ embeds: [
@ -1154,7 +1153,7 @@ module.exports = class TicketManager {
], ],
}); });
await new Promise(resolve => setTimeout(resolve, 5000)); 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) || {});
} }
/** /**