Class ModalBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating ModalInfo.
public class ModalBuilder
- Inheritance
-
ModalBuilder
- Inherited Members
Constructors
ModalBuilder(Type, ModalInitializer, InteractionService)
Initializes a new ModalBuilder
public ModalBuilder(Type type, ModalInitializer modalInitializer, InteractionService interactionService)
Parameters
type
TypemodalInitializer
ModalInitializerThe initialization delegate for this modal.
interactionService
InteractionService
Properties
Components
Gets a collection of the components of this modal.
public IReadOnlyCollection<IInputComponentBuilder> Components { get; }
Property Value
ModalInitializer
Gets the initialization delegate for this modal.
public ModalInitializer ModalInitializer { get; }
Property Value
Title
Gets the title of this modal.
public string Title { get; set; }
Property Value
Type
Gets the IModal implementation used to initialize this object.
public Type Type { get; }
Property Value
Methods
AddTextComponent(Action<TextInputComponentBuilder>)
Adds text components to Components.
public ModalBuilder AddTextComponent(Action<TextInputComponentBuilder> configure)
Parameters
configure
Action<TextInputComponentBuilder>Text Component builder factory.
Returns
- ModalBuilder
The builder instance.
WithTitle(string)
Sets Title.
public ModalBuilder WithTitle(string title)
Parameters
Returns
- ModalBuilder
The builder instance.