Class ModalCommandBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating a ModalCommandInfo.
public class ModalCommandBuilder : CommandBuilder<ModalCommandInfo, ModalCommandBuilder, ModalCommandParameterBuilder>, ICommandBuilder
- Inheritance
-
ModalCommandBuilder
- Implements
- Inherited Members
-
CommandBuilder<ModalCommandInfo, ModalCommandBuilder, ModalCommandParameterBuilder>.IgnoreGroupNamesCommandBuilder<ModalCommandInfo, ModalCommandBuilder, ModalCommandParameterBuilder>.TreatNameAsRegex
Constructors
ModalCommandBuilder(ModuleBuilder)
Initializes a new ModalCommandBuilder.
public ModalCommandBuilder(ModuleBuilder module)
Parameters
module
ModuleBuilderParent module of this modal.
ModalCommandBuilder(ModuleBuilder, string, ExecuteCallback)
Initializes a new ModalCommandBuilder.
public ModalCommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback)
Parameters
module
ModuleBuilderParent module of this modal.
name
stringName of this modal.
callback
ExecuteCallbackExecution callback of this modal.
Properties
Instance
protected override ModalCommandBuilder Instance { get; }
Property Value
Methods
AddParameter(Action<ModalCommandParameterBuilder>)
Adds a modal parameter to the parameters collection.
public override ModalCommandBuilder AddParameter(Action<ModalCommandParameterBuilder> configure)
Parameters
configure
Action<ModalCommandParameterBuilder>ModalCommandParameterBuilder factory.
Returns
- ModalCommandBuilder
The builder instance.