class ModalSubmitFields

export class ModalSubmitFields

Represents the serialized fields from a modal submit interaction

The components within the modal

The extracted fields from the modal

getField<

Type extends ComponentType

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

Gets a field given a custom id from a component

getStringSelectValues(
customId: string
) : readonly string[]

Gets the values of a string select component given a custom id

getTextInputValue(
customId: string
) : string

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