import {Modal} from "./Modal"; import {Interaction, MessageComponentInteraction, TextInputBuilder} from "discord.js"; export class Prompt extends Modal { public async requestValue( label: string, field: TextInputBuilder, interaction: MessageComponentInteraction ): Promise { const modal = this.getBuilder() .setTitle(label); await interaction.showModal(modal); const responseInteraction = await this.awaitResponse(); responseInteraction.fields.getTextInputValue() } }