Ticket unclaiming

This commit is contained in:
Tarrgon
2025-06-24 06:23:02 -04:00
parent 8ddfbed396
commit 8236da075a
3 changed files with 58 additions and 13 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags, ChannelType } from 'discord.js';
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags, ChannelType, ButtonBuilder, ButtonStyle } from 'discord.js';
import { ticketCooldownMap } from '../shared/ticket-cooldown';
export default {
@@ -9,6 +9,11 @@ export default {
if (!channel || !channel.isThread() || !channel.isSendable() || channel.type != ChannelType.PrivateThread)
return interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'Oops. Something went wrong. Please report this to a staff member.' });
await interaction.message.edit({
content: interaction.message.content,
components: []
});
await channel.send(`This ticket has been closed by ${interaction.user}`);
await interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'Ticket closed.' });