const { Client, ModalSubmitInteraction, EmbedBuilder, ActionRowBuilder } = require("discord.js") module.exports = { name: "interactionCreate", async execute(interaction, client) { const { type, customId, channel, guild, user, fields } = interaction if (!interaction.modalSubmit()) return; if (interaction.customId === 'profile-modal') { const orientationInput = interaction.fields.getTextInputValue('orientation-input'); const locationInput = interaction.fields.getTextInputValue('location-input'); const aboutInput = interaction.fields.getTextInputValue('about-input'); console.log({ orientation, location, about }); const embed = new EmbedBuilder() .setColor("blue") .setTitle('Orientation') .setThumbnail(guild.iconURL()) .setDescription(orientationInput) .setTimestamp() const Embed2 = new EmbedBuilder() .setColor("blue") .setTitle("location") .setThumbnail(guild.iconURL()) .setDescription(locationInput) .setTimestamp() const Embed3 = new EmbedBuilder() .setColor("blue") .setTitle("about") .setThumbnail(guild.iconURL()) .setDescription(messageInput) .setTimestamp() const buttons = new ActionRowBuilder() .addComponents( new ButtonBuilder() .setCustomId('Submit-profile') .setLabel('Submit') .setEmoji("✅") .setStyle(ButtonStyle.Primary), ); await interaction.reply({ embeds: [Embed1, Embed2, Embed3], components: [row], }) } } } node:events:491 throw er; // Unhandled 'error' event ^ TypeError [ModalSubmitInteractionFieldNotFound]: Required field with custom id "orientation-input" not found. at ModalSubmitFields.getField (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\structures\ModalSubmitFields.js:36:23) at ModalSubmitFields.getTextInputValue (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\structures\ModalSubmitFields.js:51:17) at Object.execute (C:\Users\thoma\Desktop\Bot2022\Events\Modal\Profile.js:14:57) at Client. (C:\Users\thoma\Desktop\Bot2022\Structures\Handlers\Events.js:23:55) at Client.emit (node:events:525:35) at InteractionCreateAction.handle (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\client\websocket\WebSocketManager.js:352:31) at WebSocketShard.onPacket (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\client\websocket\WebSocketShard.js:489:22) at WebSocketShard.onMessage (C:\Users\thoma\Desktop\Bot2022\node_modules\discord.js\src\client\websocket\WebSocketShard.js:328:10) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) { code: 'ModalSubmitInteractionFieldNotFound' } Node.js v18.12.1