Class MenuProperties
public abstract class MenuProperties : ComponentProperties
- Inheritance
-
MenuProperties
- Derived
- Inherited Members
Constructors
MenuProperties(string)
protected MenuProperties(string customId)
Parameters
customId
stringID for the menu (max 100 characters).
Properties
CustomId
ID for the menu (max 100 characters).
[JsonPropertyName("custom_id")]
public string CustomId { get; set; }
Property Value
Disabled
Whether the menu is disabled.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("disabled")]
public bool Disabled { get; set; }
Property Value
MaxValues
Maximum number of items that can be chosen, default 1 (max 25).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("max_values")]
public int? MaxValues { get; set; }
Property Value
- int?
MinValues
Minimum number of items that must be chosen, default 1 (0-25).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("min_values")]
public int? MinValues { get; set; }
Property Value
- int?
Placeholder
Placeholder text if nothing is selected (max 150 characters).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("placeholder")]
public string? Placeholder { get; set; }
Property Value
Methods
WithCustomId(string)
ID for the menu (max 100 characters).
public MenuProperties WithCustomId(string customId)
Parameters
customId
string
Returns
WithDisabled(bool)
Whether the menu is disabled.
public MenuProperties WithDisabled(bool disabled = true)
Parameters
disabled
bool
Returns
WithMaxValues(int?)
Maximum number of items that can be chosen, default 1 (max 25).
public MenuProperties WithMaxValues(int? maxValues)
Parameters
maxValues
int?
Returns
WithMinValues(int?)
Minimum number of items that must be chosen, default 1 (0-25).
public MenuProperties WithMinValues(int? minValues)
Parameters
minValues
int?
Returns
WithPlaceholder(string?)
Placeholder text if nothing is selected (max 150 characters).
public MenuProperties WithPlaceholder(string? placeholder)
Parameters
placeholder
string