CoreClasses
FieldsHandler
This class is used to parse the options of a command, and provide errors for any missing or invalid options. It is used internally by the Command class.
Extends
Base
Constructors
new FieldsHandler()
new FieldsHandler(
client
,interaction
):FieldsHandler
Parameters
Parameter | Type |
---|---|
client | Client |
interaction | APIModalSubmitInteraction |
Returns
Overrides
Base.constructor
Properties
Property | Modifier | Type | Default value | Description | Inherited from |
---|---|---|---|---|---|
client | public | Client | undefined | - | Base.client |
errors | readonly | string [] | [] | The errors that were encountered while parsing the options. | - |
raw | readonly | object | {} | The raw options that were in the interaction data, before they were parsed. | - |
Methods
getText()
getText(key, required)
getText(
key
,required
?):undefined
|string
Get the value of a text input.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The name of the input to get the value of. |
required ? | false | - |
Returns
undefined
| string
The value of the input, or undefined if the input was not provided.
getText(key, required)
getText(
key
,required
):string
Parameters
Parameter | Type |
---|---|
key | string |
required | true |
Returns
string