(tickets): Implement on close-mod-ticket button.

This commit is contained in:
2026-10-14 09:40:08 +08:00
parent 6023efe42d
commit 0124f0ad7a
3 changed files with 6 additions and 11 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ export default {
name: 'close-ticket',
handler: async function (client: Client, interaction: ButtonInteraction) {
const channel = await interaction.channel?.fetch();
if (!channel || !channel.isThread() || !channel.isSendable() || channel.type != ChannelType.PrivateThread)
return await interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'Oops. Something went wrong. Please report this to a staff member.' });
@@ -20,7 +19,7 @@ export default {
});
if (!await closeTicket(client, channel, `This ticket has been closed by ${interaction.user}`))
return await interaction.editReply({ content: 'An error occured while trying to close this ticket.' });
return await interaction.editReply({ content: 'An error occurred while trying to close this ticket.' });
await interaction.editReply({ content: 'Ticket closed.' });
}