From 88c9a985ba2c24c5e17ef79ec0ed3c376053cc17 Mon Sep 17 00:00:00 2001 From: limtvon-cmd Date: Fri, 11 Sep 2026 05:09:03 +0300 Subject: [PATCH] Add ticket rename modal interaction --- src/interactions/modals/ticketModals.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/interactions/modals/ticketModals.js diff --git a/src/interactions/modals/ticketModals.js b/src/interactions/modals/ticketModals.js new file mode 100644 index 0000000000..dbcd0ea4a2 --- /dev/null +++ b/src/interactions/modals/ticketModals.js @@ -0,0 +1,19 @@ +import TicketService from '../../services/ticketService.js'; + +export default [ + { + name: 'ticket_rename_modal', + async execute(interaction) { + const newName = interaction.fields.getTextInputValue('new_ticket_name'); + const ticketService = new TicketService(interaction.client); + + try { + await interaction.deferReply(); + await ticketService.renameTicket(interaction.channel, newName); + await interaction.editReply(`✏️ Ticket renamed to **${newName}**`); + } catch (error) { + await interaction.editReply('❌ Error renaming ticket'); + } + }, + }, +];