Constructor
new Dropdown()
- Description:
Creates a dropdown component.
- Source:
- See:
Methods
addChannelTypes(channelTypes) → {CommandOption}
- Description:
Sets which channel types are selectable by the user.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
channelTypes |
Array.<Number> | An array of channel types to offer as a choice. |
Returns:
- Type
- CommandOption
addDefaultOption(option) → {Dropdown}
- Description:
Adds a default option to the dropdown.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
option |
Object | The default option to add to the dropdown. |
Returns:
- Type
- Dropdown
addOption(option) → {Dropdown}
- Description:
Adds an option to the dropdown.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
option |
DropdownOption | Adds an option to the dropdown. |
Returns:
- Type
- Dropdown
setCustomID(id) → {Dropdown}
- Description:
Set the custom id of the dropdown.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The custom id of the dropdown. |
Returns:
- Type
- Dropdown
setDisabled(disabled) → {Dropdown}
- Description:
Disables the dropdown from being clickable.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
disabled |
Boolean | Whether this dropdown should be displayed as disabled. |
Returns:
- Type
- Dropdown
setMaxValue(value) → {Dropdown}
- Description:
Sets the maximum value the user may enter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
Number | The maximum number value that the user may enter. |
Returns:
- Type
- Dropdown
setMinValue(value) → {CommandOption}
- Description:
Sets the minimum value the user may enter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
Number | The minimum number value that the user may enter. |
Returns:
- Type
- CommandOption
setPlaceholder(placeholder) → {Dropdown}
- Description:
Sets the placeholder text.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
placeholder |
String | Placeholder text if nothing is selected. |
Returns:
- Type
- Dropdown
setType(type) → {Dropdown}
- Description:
Sets the option type.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
type |
Number | The option type. |
Returns:
- Type
- Dropdown
toJSON() → {Object}
- Description:
Returns the correct Discord format for a dropdown.
- Source:
Returns:
- Type
- Object