Class StringMenuProperties
public class StringMenuProperties : MenuProperties, IEnumerable<StringMenuSelectOptionProperties>, IEnumerable
- Inheritance
-
StringMenuProperties
- Implements
- Inherited Members
Constructors
StringMenuProperties(string)
public StringMenuProperties(string customId)
Parameters
customId
string
StringMenuProperties(string, IEnumerable<StringMenuSelectOptionProperties>)
public StringMenuProperties(string customId, IEnumerable<StringMenuSelectOptionProperties> options)
Parameters
customId
stringoptions
IEnumerable<StringMenuSelectOptionProperties>
Properties
ComponentType
Type of the component.
public override ComponentType ComponentType { get; }
Property Value
Options
[JsonPropertyName("options")]
public IEnumerable<StringMenuSelectOptionProperties> Options { get; set; }
Property Value
Methods
AddOptions(params StringMenuSelectOptionProperties[])
public StringMenuProperties AddOptions(params StringMenuSelectOptionProperties[] options)
Parameters
options
StringMenuSelectOptionProperties[]
Returns
AddOptions(IEnumerable<StringMenuSelectOptionProperties>)
public StringMenuProperties AddOptions(IEnumerable<StringMenuSelectOptionProperties> options)
Parameters
Returns
WithCustomId(string)
ID for the menu (max 100 characters).
public StringMenuProperties WithCustomId(string customId)
Parameters
customId
string
Returns
WithDisabled(bool)
Whether the menu is disabled.
public StringMenuProperties WithDisabled(bool disabled = true)
Parameters
disabled
bool
Returns
WithMaxValues(int?)
Maximum number of items that can be chosen, default 1 (max 25).
public StringMenuProperties WithMaxValues(int? maxValues)
Parameters
maxValues
int?
Returns
WithMinValues(int?)
Minimum number of items that must be chosen, default 1 (0-25).
public StringMenuProperties WithMinValues(int? minValues)
Parameters
minValues
int?
Returns
WithOptions(IEnumerable<StringMenuSelectOptionProperties>)
public StringMenuProperties WithOptions(IEnumerable<StringMenuSelectOptionProperties> options)
Parameters
Returns
WithPlaceholder(string?)
Placeholder text if nothing is selected (max 150 characters).
public StringMenuProperties WithPlaceholder(string? placeholder)
Parameters
placeholder
string