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