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
TInfoTBuilder
- 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
ComponentType
Gets the component type of this input component.
public ComponentType ComponentType { get; }
Property Value
DefaultValue
Gets the default value of this input component property.
public object DefaultValue { get; set; }
Property Value
Instance
protected abstract TBuilder Instance { get; }
Property Value
- TBuilder
Modal
Gets the parent modal of this input component.
public ModalBuilder Modal { get; }
Property Value
PropertyInfo
Get the PropertyInfo of this component's property.
public PropertyInfo PropertyInfo { get; }
Property Value
Type
Get the reference type of this input component.
public Type Type { get; }
Property Value
Methods
SetDefaultValue(object)
Sets DefaultValue.
public virtual TBuilder SetDefaultValue(object value)
Parameters
valueobjectNew value of the DefaultValue.
Returns
- TBuilder
The builder instance.
WithAttributes(params Attribute[])
Adds attributes to Attributes.
public virtual TBuilder WithAttributes(params Attribute[] attributes)
Parameters
attributesAttribute[]New attributes to be added to Attributes.
Returns
- TBuilder
The builder instance.
WithComponentType(ComponentType)
Sets ComponentType.
public virtual TBuilder WithComponentType(ComponentType componentType)
Parameters
componentTypeComponentTypeNew value of the ComponentType.
Returns
- TBuilder
The builder instance.
WithType(Type)
Sets Type.
public virtual TBuilder WithType(Type type)
Parameters
Returns
- TBuilder
The builder instance.