if (i.values[0] === 'supportselection') { // Show the modal to the user i.showModal(supportModal); const supportModalInteraction = await i.awaitModalSubmit({ time: 60_000 }); // Access submitted values and include them in the embed if (supportModalInteraction) { // Assuming you have access to submittedValues from the form const submittedSupport1 = i.fields.getTextInputValue("support_first"); const submittedSupport2 = i.fields.getTextInputValue("support_second"); const submittedSupport3 = i.fields.getTextInputValue("support_third"); const submittedSupport4 = i.fields.getTextInputValue("support_forth"); //Create ticket room const ticketName = `Support-${i.user.tag}`; const ticketroom = await ticketChannel.threads.create({ name: ticketName, type: ChannelType.PrivateThread }); await ticketroom.members.add(i.user.id); console.log(`! New support ticket thread: ${ticketroom.name}`); // Send ticket Created Embed to Panel, acknowledge user the ticket successfully created. const supportCreatedEmbed = new EmbedBuilder() .setColor('#00FF6A') .setDescription(`**💌 | Ticket Created**\n@${i.user.id} has open a new ticket: ${ticketroom}`) .setFooter({ text: bot.config.embed.footer, iconURL: bot.config.embed.serverIcon }) .setTimestamp(); await panelMessage.reply({ embeds: [supportCreatedEmbed], ephemeral: true }).then((reply) => { setTimeout(() => { reply.delete(); }, 1500); }); // Then send the ticket Welcome Embed to the ticket room const supportWelcomeEmbed = new EmbedBuilder() .setColor('#499D6C') .setDescription(`## **💌 TICKET CREATED - SUPPORT**`) .addFields( { name: ' ', value: `Hello <@${i.user.id}> !` + `\nThank you for contacting support.` + `\nPlease describe your issue and support team will response as soon as possible!` }, { name: ' ', value: `\n\n**🔹 Your In-game name?**\n${submittedSupport1}` + `\n**🔹 What are you looking for in this ticket?**\n${submittedSupport2}` + `\n**🔹 The title of the report?**\n${submittedSupport3}` + `\n**🔹 Please describe your question here 😉**\n${submittedSupport4}` }, { name: ' ', value: `\n\n` + `[**ᴡɪᴋɪ**](https://wiki.skyhikermc.com/) **·** [**ꜱᴛᴏʀᴇ**](http://store.skyhikermc.com/) **·** ` + `[**ʀᴜʟᴇꜱ**](https://wiki.skyhikermc.com/rules) **·** [**ꜰᴀᴄᴇʙᴏᴏᴋ**](https://www.facebook.com/SkyHikerMC/) **·** ` + `[**ᴅɪꜱᴄᴏʀᴅ**](https://discord.skyhikermc.com/) ` } ) .setImage('https://s10.gifyu.com/images/S4VYM.gif') .setFooter({ text: bot.config.embed.footer, iconURL: bot.config.embed.serverIcon }) .setTimestamp(); ticketroom.send({ content: `<@${i.user.id}> & <@&737931806187323448>`, embeds: [supportWelcomeEmbed], components: [ticketActionRow] }); }