Class RoleMenuProperties
public class RoleMenuProperties : EntityMenuProperties, IComponentProperties
- Inheritance
-
RoleMenuProperties
- Implements
- Inherited Members
Constructors
RoleMenuProperties(string)
public RoleMenuProperties(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(RoleMenuProperties.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 RoleMenuProperties AddDefaultValues(IEnumerable<ulong> defaultValues)
Parameters
defaultValues
IEnumerable<ulong>
Returns
AddDefaultValues(params ulong[])
Default values for auto-populated select menu components.
public RoleMenuProperties AddDefaultValues(params ulong[] defaultValues)
Parameters
defaultValues
ulong[]
Returns
WithCustomId(string)
ID for the menu (max 100 characters).
public RoleMenuProperties WithCustomId(string customId)
Parameters
customId
string
Returns
WithDefaultValues(IEnumerable<ulong>?)
Default values for auto-populated select menu components.
public RoleMenuProperties WithDefaultValues(IEnumerable<ulong>? defaultValues)
Parameters
defaultValues
IEnumerable<ulong>
Returns
WithDisabled(bool)
Whether the menu is disabled.
public RoleMenuProperties WithDisabled(bool disabled = true)
Parameters
disabled
bool
Returns
WithId(int?)
public RoleMenuProperties WithId(int? id)
Parameters
id
int?
Returns
WithMaxValues(int?)
Maximum number of items that can be chosen, default 1 (max 25).
public RoleMenuProperties WithMaxValues(int? maxValues)
Parameters
maxValues
int?
Returns
WithMinValues(int?)
Minimum number of items that must be chosen, default 1 (0-25).
public RoleMenuProperties WithMinValues(int? minValues)
Parameters
minValues
int?
Returns
WithParentId(int?)
public RoleMenuProperties WithParentId(int? parentId)
Parameters
parentId
int?
Returns
WithPlaceholder(string?)
Placeholder text if nothing is selected (max 150 characters).
public RoleMenuProperties WithPlaceholder(string? placeholder)
Parameters
placeholder
string