fix: infinite feedback loop (closes #407)

This commit is contained in:
Isaac 2023-05-29 18:47:30 +01:00
parent 6f36ef9204
commit f1029b8320
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -22,7 +22,7 @@ module.exports = class CloseButton extends Button {
// the close button on the opening message, the same as using /close // the close button on the opening message, the same as using /close
await client.tickets.beforeRequestClose(interaction); await client.tickets.beforeRequestClose(interaction);
} else { } else {
const ticket = await client.tickets.getTicket(interaction.channel.id); const ticket = await client.tickets.getTicket(interaction.channel.id, true); // true to override cache and load new feedback
const getMessage = client.i18n.getLocale(ticket.guild.locale); const getMessage = client.i18n.getLocale(ticket.guild.locale);
const staff = await isStaff(interaction.guild, interaction.user.id); const staff = await isStaff(interaction.guild, interaction.user.id);
@ -78,4 +78,4 @@ module.exports = class CloseButton extends Button {
} }
} }
} }
}; };