const { client, Modal, TextInputComponent } = require('discord.js'); client.on("interactionCreate", async (interaction) => { if (interaction.isButton()){ const modal_data = new Modal() .setCustomId('modalrequest') .setTitle('Add something to Queue!') .addComponents(new MessageActionRow() .addComponents( new TextInputComponent() .setCustomId('request_name') .setLabel("I want to add:") .setStyle('SHORT') .setMinLength(3) .setMaxLength(150) .setPlaceholder("Enter text here..") .setRequired(true) )); await interaction.showModal(modal_data); } if (interaction.isModalSubmit()){ console.log(interaction.fields.getTextInputValue("request_name")) } });