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