Table of Contents

Class UserMenuProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
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

ComponentType

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

IEnumerable<ulong>

Methods

AddDefaultValues(IEnumerable<ulong>)

Default values for auto-populated select menu components.

public UserMenuProperties AddDefaultValues(IEnumerable<ulong> defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

UserMenuProperties

AddDefaultValues(params ulong[])

Default values for auto-populated select menu components.

public UserMenuProperties AddDefaultValues(params ulong[] defaultValues)

Parameters

defaultValues ulong[]

Returns

UserMenuProperties

WithCustomId(string)

ID for the menu (max 100 characters).

public UserMenuProperties WithCustomId(string customId)

Parameters

customId string

Returns

UserMenuProperties

WithDefaultValues(IEnumerable<ulong>?)

Default values for auto-populated select menu components.

public UserMenuProperties WithDefaultValues(IEnumerable<ulong>? defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

UserMenuProperties

WithDisabled(bool)

Whether the menu is disabled.

public UserMenuProperties WithDisabled(bool disabled = true)

Parameters

disabled bool

Returns

UserMenuProperties

WithMaxValues(int?)

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

public UserMenuProperties WithMaxValues(int? maxValues)

Parameters

maxValues int?

Returns

UserMenuProperties

WithMinValues(int?)

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

public UserMenuProperties WithMinValues(int? minValues)

Parameters

minValues int?

Returns

UserMenuProperties

WithPlaceholder(string?)

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

public UserMenuProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

UserMenuProperties