Table of Contents

Class ModalComponentBuilder<TInfo, TBuilder>

Namespace
Discord.Interactions.Builders
Assembly
Discord.Net.Interactions.dll
public abstract class ModalComponentBuilder<TInfo, TBuilder> : IModalComponentBuilder where TInfo : ModalComponentInfo where TBuilder : ModalComponentBuilder<TInfo, TBuilder>

Type Parameters

TInfo
TBuilder
Inheritance
ModalComponentBuilder<TInfo, TBuilder>
Implements
Derived
Inherited Members

Properties

Attributes

Gets a collection of the attributes of this component.

public IReadOnlyCollection<Attribute> Attributes { get; }

Property Value

IReadOnlyCollection<Attribute>

ComponentType

Gets the component type of this input component.

public ComponentType ComponentType { get; }

Property Value

ComponentType

DefaultValue

Gets the default value of this input component property.

public object DefaultValue { get; set; }

Property Value

object

Instance

protected abstract TBuilder Instance { get; }

Property Value

TBuilder

Modal

Gets the parent modal of this input component.

public ModalBuilder Modal { get; }

Property Value

ModalBuilder

PropertyInfo

Get the PropertyInfo of this component's property.

public PropertyInfo PropertyInfo { get; }

Property Value

PropertyInfo

Type

Get the reference type of this input component.

public Type Type { get; }

Property Value

Type

Methods

SetDefaultValue(object)

public virtual TBuilder SetDefaultValue(object value)

Parameters

value object

New value of the DefaultValue.

Returns

TBuilder

The builder instance.

WithAttributes(params Attribute[])

Adds attributes to Attributes.

public virtual TBuilder WithAttributes(params Attribute[] attributes)

Parameters

attributes Attribute[]

New attributes to be added to Attributes.

Returns

TBuilder

The builder instance.

WithComponentType(ComponentType)

public virtual TBuilder WithComponentType(ComponentType componentType)

Parameters

componentType ComponentType

New value of the ComponentType.

Returns

TBuilder

The builder instance.

WithType(Type)

Sets Type.

public virtual TBuilder WithType(Type type)

Parameters

type Type

New value of the Type.

Returns

TBuilder

The builder instance.