Table of Contents

Class SelectMenuComponentBuilder

Namespace
Discord.Interactions.Builders
Assembly
Discord.Net.Interactions.dll

Represents a builder for creating SelectMenuComponentInfo.

public class SelectMenuComponentBuilder : InputComponentBuilder<SelectMenuComponentInfo, SelectMenuComponentBuilder>, IInputComponentBuilder, IModalComponentBuilder
Inheritance
SelectMenuComponentBuilder
Implements
Inherited Members

Constructors

SelectMenuComponentBuilder(ModalBuilder)

Initialize a new SelectMenuComponentBuilder.

public SelectMenuComponentBuilder(ModalBuilder modal)

Parameters

modal ModalBuilder

Parent modal of this component.

Properties

Instance

protected override SelectMenuComponentBuilder Instance { get; }

Property Value

SelectMenuComponentBuilder

MaxValues

Gets or sets the maximum number of values that can be selected.

public int MaxValues { get; set; }

Property Value

int

MinValues

Gets and sets the minimum number of values that can be selected.

public int MinValues { get; set; }

Property Value

int

Options

Gets the options of this select menu component.

public IReadOnlyCollection<SelectMenuOptionBuilder> Options { get; }

Property Value

IReadOnlyCollection<SelectMenuOptionBuilder>

Placeholder

Gets and sets the placeholder for the select menu iput.

public string Placeholder { get; set; }

Property Value

string

Methods

AddOption(SelectMenuOptionBuilder)

Adds an option to Options.

public SelectMenuComponentBuilder AddOption(SelectMenuOptionBuilder option)

Parameters

option SelectMenuOptionBuilder

Option to be added to Options.

Returns

SelectMenuComponentBuilder

The builder instance.

AddOption(Action<SelectMenuOptionBuilder>)

Adds an option to Options.

public SelectMenuComponentBuilder AddOption(Action<SelectMenuOptionBuilder> configure)

Parameters

configure Action<SelectMenuOptionBuilder>

Select menu option builder factory.

Returns

SelectMenuComponentBuilder

The builder instance.