Table of Contents

Class MenuProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public abstract class MenuProperties : ComponentProperties
Inheritance
MenuProperties
Derived
Inherited Members

Constructors

MenuProperties(string)

protected MenuProperties(string customId)

Parameters

customId string

ID 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

string

Disabled

Whether the menu is disabled.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("disabled")]
public bool Disabled { get; set; }

Property Value

bool

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

string

Methods

WithCustomId(string)

ID for the menu (max 100 characters).

public MenuProperties WithCustomId(string customId)

Parameters

customId string

Returns

MenuProperties

WithDisabled(bool)

Whether the menu is disabled.

public MenuProperties WithDisabled(bool disabled = true)

Parameters

disabled bool

Returns

MenuProperties

WithMaxValues(int?)

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

public MenuProperties WithMaxValues(int? maxValues)

Parameters

maxValues int?

Returns

MenuProperties

WithMinValues(int?)

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

public MenuProperties WithMinValues(int? minValues)

Parameters

minValues int?

Returns

MenuProperties

WithPlaceholder(string?)

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

public MenuProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

MenuProperties