Table of Contents

Class RoleMenuProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class RoleMenuProperties : EntityMenuProperties
Inheritance
RoleMenuProperties
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

ComponentType

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

IEnumerable<ulong>

Methods

AddDefaultValues(IEnumerable<ulong>)

Default values for auto-populated select menu components.

public RoleMenuProperties AddDefaultValues(IEnumerable<ulong> defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

RoleMenuProperties

AddDefaultValues(params ulong[])

Default values for auto-populated select menu components.

public RoleMenuProperties AddDefaultValues(params ulong[] defaultValues)

Parameters

defaultValues ulong[]

Returns

RoleMenuProperties

WithCustomId(string)

ID for the menu (max 100 characters).

public RoleMenuProperties WithCustomId(string customId)

Parameters

customId string

Returns

RoleMenuProperties

WithDefaultValues(IEnumerable<ulong>?)

Default values for auto-populated select menu components.

public RoleMenuProperties WithDefaultValues(IEnumerable<ulong>? defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

RoleMenuProperties

WithDisabled(bool)

Whether the menu is disabled.

public RoleMenuProperties WithDisabled(bool disabled = true)

Parameters

disabled bool

Returns

RoleMenuProperties

WithMaxValues(int?)

Maximum number of items that can be chosen, default 1 (max 25).

public RoleMenuProperties WithMaxValues(int? maxValues)

Parameters

maxValues int?

Returns

RoleMenuProperties

WithMinValues(int?)

Minimum number of items that must be chosen, default 1 (0-25).

public RoleMenuProperties WithMinValues(int? minValues)

Parameters

minValues int?

Returns

RoleMenuProperties

WithPlaceholder(string?)

Placeholder text if nothing is selected (max 150 characters).

public RoleMenuProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

RoleMenuProperties