Class UserMenuProperties
public class UserMenuProperties : EntityMenuProperties
- Inheritance
-
UserMenuProperties
- Inherited Members
Constructors
UserMenuProperties(string)
public UserMenuProperties(string customId)
Parameters
customId
string
Properties
ComponentType
Type of the component.
public override ComponentType ComponentType { get; }
Property Value
DefaultValues
Default values for auto-populated select menu components.
[JsonConverter(typeof(UserMenuProperties.DefaultValuesConverter))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("default_values")]
public IEnumerable<ulong>? DefaultValues { get; set; }
Property Value
Methods
AddDefaultValues(IEnumerable<ulong>)
Default values for auto-populated select menu components.
public UserMenuProperties AddDefaultValues(IEnumerable<ulong> defaultValues)
Parameters
defaultValues
IEnumerable<ulong>
Returns
AddDefaultValues(params ulong[])
Default values for auto-populated select menu components.
public UserMenuProperties AddDefaultValues(params ulong[] defaultValues)
Parameters
defaultValues
ulong[]
Returns
WithCustomId(string)
ID for the menu (max 100 characters).
public UserMenuProperties WithCustomId(string customId)
Parameters
customId
string
Returns
WithDefaultValues(IEnumerable<ulong>?)
Default values for auto-populated select menu components.
public UserMenuProperties WithDefaultValues(IEnumerable<ulong>? defaultValues)
Parameters
defaultValues
IEnumerable<ulong>
Returns
WithDisabled(bool)
Whether the menu is disabled.
public UserMenuProperties WithDisabled(bool disabled = true)
Parameters
disabled
bool
Returns
WithMaxValues(int?)
Maximum number of items that can be chosen, default 1 (max 25).
public UserMenuProperties WithMaxValues(int? maxValues)
Parameters
maxValues
int?
Returns
WithMinValues(int?)
Minimum number of items that must be chosen, default 1 (0-25).
public UserMenuProperties WithMinValues(int? minValues)
Parameters
minValues
int?
Returns
WithPlaceholder(string?)
Placeholder text if nothing is selected (max 150 characters).
public UserMenuProperties WithPlaceholder(string? placeholder)
Parameters
placeholder
string