ModalSubmitFields

export class ModalSubmitFields
export class ModalSubmitFields
Represents the serialized fields from a modal submit interaction
constructor(components)
Constructs a new instance of the ModalSubmitFields class
NameTypeOptionalDescription
componentsModalActionRowComponent[][]NoNone
components:ActionRowModalData[]
The components within the modal
The extracted fields from the modal
getField(customId, type):{ type: T } & TextInputModalData
Gets a field given a custom id from a component
NameTypeOptionalDescription
customIdstringNoThe custom id of the component
typeTNoThe type of the component
getTextInputValue(customId):string
Gets the value of a text input component given a custom id
NameTypeOptionalDescription
customIdstringNoThe custom id of the text input component