Discord Bot BaseRespondersModalsHow to reply discord modalsCreating a Responder for Modals Below you can see a code snippet responding to a command interaction by showing a modal: command.tsimport { createModalFields } from "@magicyan/discord"; // ... interaction.showModal({ customId: "form/modal", title: "Form", components: createModalFields({ name:{ label: "What's your name?", style: TextInputStyle.Short }, age:{ label: "What's your age?", style: TextInputStyle.Short }, }) }); // ... Reply to modal interaction To reply to a modal with Responder, add ResponderType.Modal to the types: responder.tscreateResponder({ customId: "form/modal", types: [ResponderType.Modal], cache: "cached", async run(interaction) { const { fields, member } = interaction; const name = fields.getTextInputValue("name"); const age = fields.getTextInputValue("age"); await registerMember(member, { name, age }); // Example function interaction.reply({ flags: ["Ephemeral"], content: `Registered as ${name}` }); }, });Edit on GitHubPreviousSelect menuNextParams