Table of Contents

Class StringMenuProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class StringMenuProperties : MenuProperties, IEnumerable<StringMenuSelectOptionProperties>, IEnumerable
Inheritance
StringMenuProperties
Implements
Inherited Members

Constructors

StringMenuProperties(string)

public StringMenuProperties(string customId)

Parameters

customId string

StringMenuProperties(string, IEnumerable<StringMenuSelectOptionProperties>)

public StringMenuProperties(string customId, IEnumerable<StringMenuSelectOptionProperties> options)

Parameters

customId string
options IEnumerable<StringMenuSelectOptionProperties>

Properties

ComponentType

Type of the component.

public override ComponentType ComponentType { get; }

Property Value

ComponentType

Options

[JsonPropertyName("options")]
public IEnumerable<StringMenuSelectOptionProperties> Options { get; set; }

Property Value

IEnumerable<StringMenuSelectOptionProperties>

Methods

AddOptions(params StringMenuSelectOptionProperties[])

public StringMenuProperties AddOptions(params StringMenuSelectOptionProperties[] options)

Parameters

options StringMenuSelectOptionProperties[]

Returns

StringMenuProperties

AddOptions(IEnumerable<StringMenuSelectOptionProperties>)

public StringMenuProperties AddOptions(IEnumerable<StringMenuSelectOptionProperties> options)

Parameters

options IEnumerable<StringMenuSelectOptionProperties>

Returns

StringMenuProperties

WithCustomId(string)

ID for the menu (max 100 characters).

public StringMenuProperties WithCustomId(string customId)

Parameters

customId string

Returns

StringMenuProperties

WithDisabled(bool)

Whether the menu is disabled.

public StringMenuProperties WithDisabled(bool disabled = true)

Parameters

disabled bool

Returns

StringMenuProperties

WithMaxValues(int?)

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

public StringMenuProperties WithMaxValues(int? maxValues)

Parameters

maxValues int?

Returns

StringMenuProperties

WithMinValues(int?)

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

public StringMenuProperties WithMinValues(int? minValues)

Parameters

minValues int?

Returns

StringMenuProperties

WithOptions(IEnumerable<StringMenuSelectOptionProperties>)

public StringMenuProperties WithOptions(IEnumerable<StringMenuSelectOptionProperties> options)

Parameters

options IEnumerable<StringMenuSelectOptionProperties>

Returns

StringMenuProperties

WithPlaceholder(string?)

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

public StringMenuProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

StringMenuProperties