const { Client, ModalSubmitInteraction, EmbedBuilder } = require("discord.js") module.exports = { name: "interactionCreate", async execute(interaction, client) { const { customId, channel, fields, member } = interaction if (!interaction.isModalSubmit()) return; if (interaction.customId === 'profile-modal') { const name = interaction.fields.getTextInputValue('nameInput'); const about = interaction.fields.getTextInputValue('aboutInput'); const looking = interaction.fields.getTextInputValue('lookingInput'); const hobbies = interaction.fields.getTextInputValue('hobbiesInput'); let user = ['KING', 'Admin']; for (role in member.roles.cache.intersect(interaction.member.roles.cache).values()) { if (interaction.member.roles.cache.has(role.id)) { console.log('The user has the role'); const Embed1 = new EmbedBuilder() .setColor("Green") .setTitle(`${user.username} Profile`) .setDescription('This is a profile system where people can get to know you a bit better and easier.') .addFields( { name: 'Age', value: 'Age' }, { name: 'Gender', value: 'Gender', inline: true }, { name: 'Verified', value: 'Verified', inline: true }, { name: 'Orientation', value: 'Orientation', inline: true }, { name: 'Height', value: 'Height' }, { name: 'Dating Status', value: 'Dating Status' }, { name: 'Location', value: 'Location' }, { name: 'DM Status', value: 'DM Status' }, { name: 'About me', value: 'About me' }, { name: 'Looking for', value: 'Looking for' }, { name: 'Hobbies', value: 'Hobbies' }, ) .setTimestamp() .setFooter({ text: 'Some footer text here' }); await interaction.reply({ content: `${user.username}`, embeds: [Embed1] }) } } } } }