import { APIMessage, APIModalSubmitInteraction, ComponentType, InteractionType, LocaleString, ModalSubmitActionRowComponent } from "discord-api-types/v10"; import BaseInteraction from "./BaseInteraction.mjs"; import { InteractionResponseMixin } from "./Response.mjs"; export default class ModalSubmitInteraction extends BaseInteraction { type: InteractionType.ModalSubmit; /** The custom id for the modal */ customId: string; /** The fields that the invoking user has provided for the modal */ fields: ModalSubmitFields; /** The selected language of the invoking user */ locale: LocaleString; /** For components, the message they were attached to */ message?: APIMessage; constructor(interaction: APIModalSubmitInteraction); /** Whether this is from a message component. */ isFromMessage(): this is ModalMessageModalSubmitInteraction; } declare const allowedResponses: ("reply" | "editReply" | "deleteReply" | "followUp" | "fetchReply" | "deferReply")[]; export default interface ModalSubmitInteraction extends InteractionResponseMixin { } export interface ModalMessageModalSubmitInteraction extends ModalSubmitInteraction { message: APIMessage; } export interface ModalMessageModalSubmitInteraction extends InteractionResponseMixin<["update", "deferUpdate"]> { } export type fields = TextInputOption; export declare class BaseField { type: ComponentType; customId: string; value: string | number | boolean; constructor(type: ComponentType, customId: string, value: string | number | boolean); } export declare class TextInputOption extends BaseField { type: ComponentType.TextInput; value: string; constructor(customId: string, value: string); } export declare class ModalSubmitFields { values: Record; constructor(components: ModalSubmitActionRowComponent[]); getField(customId: string, required: true): fields; getField(customId: string, required?: boolean): fields | undefined; getTextInputValue(customId: string, required: true): string; getTextInputValue(customId: string, required?: boolean): string | undefined; } export {};