Table of Contents

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 Type
modalInitializer ModalInitializer

The 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

IReadOnlyCollection<IInputComponentBuilder>

ModalInitializer

Gets the initialization delegate for this modal.

public ModalInitializer ModalInitializer { get; }

Property Value

ModalInitializer

Title

Gets the title of this modal.

public string Title { get; set; }

Property Value

string

Type

Gets the IModal implementation used to initialize this object.

public Type Type { get; }

Property Value

Type

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

title string

New value of the Title.

Returns

ModalBuilder

The builder instance.