mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-01-10 18:06:27 +02:00
fix: accepting a close request after a restart
This commit is contained in:
parent
519f9f4e6d
commit
f9a7f0cbd9
@ -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) || {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user