class ModalSubmitFields

export class ModalSubmitFields

Represents the serialized fields from a modal submit interaction

Constructors

constructor(
components: ModalActionRowComponent[][]
)

Constructs a new instance of the ModalSubmitFields class

components : ActionRowModalData[]

The components within the modal

The extracted fields from the modal

getField<

Type extends ComponentType

>(
customId: string
type: Type
) : { type: Type } & TextInputModalData

Gets a field given a custom id from a component

getTextInputValue(
customId: string
) : string

Gets the value of a text input component given a custom id