© 2026 Hedgehog Software, LLC
async function openVerifyModal() { const modal = new ModalBuilder() .setCustomId('verify_modal') .setTitle('Verifizierung'); const firstName = new TextInputBuilder() .setCustomId('verify_modal_first_name') .setLabel('Vorname') .setPlaceholder('Mazhor') .setStyle('Short'); const lastName = new TextInputBuilder() .setCustomId('verify_modal_last_name') .setLabel('Nachname') .setPlaceholder('Gaming') .setStyle('Short'); const id = new TextInputBuilder() .setCustomId('verify_modal_id') .setLabel('GID') .setPlaceholder('1') .setStyle('Short'); const actionRow = new ActionRowBuilder() .addComponents(firstName); const secondActionRow = new ActionRowBuilder() .addComponents(lastName); const thirdActionRow = new ActionRowBuilder() .addComponents(id); modal.addComponents(actionRow, secondActionRow, thirdActionRow); return modal; }
client.on(Events.InteractionCreate, async interaction => { if (!interaction.isButton()) return; if (interaction.customId === 'verify_button') { console.log('Opening verify modal...'); console.log(openVerifyModal()); await interaction.showModal(openVerifyModal()); } });
Join the Discord to ask follow-up questions and connect with the community
Support server for discord.js, a Node.js module to interact with Discord's apps API.
57,666 Members