Class AutocompleteCommandBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating AutocompleteCommandInfo.
public sealed class AutocompleteCommandBuilder : CommandBuilder<AutocompleteCommandInfo, AutocompleteCommandBuilder, CommandParameterBuilder>, ICommandBuilder
- Inheritance
-
AutocompleteCommandBuilder
- Implements
- Inherited Members
Constructors
AutocompleteCommandBuilder(ModuleBuilder, string, ExecuteCallback)
Initializes a new AutocompleteCommandBuilder.
public AutocompleteCommandBuilder(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
CommandName
Gets the name of the target command.
public string CommandName { get; set; }
Property Value
Instance
protected override AutocompleteCommandBuilder Instance { get; }
Property Value
ParameterName
Gets the name of the target parameter.
public string ParameterName { get; set; }
Property Value
Methods
AddParameter(Action<CommandParameterBuilder>)
Adds a command parameter to the parameters collection.
public override AutocompleteCommandBuilder AddParameter(Action<CommandParameterBuilder> configure)
Parameters
configure
Action<CommandParameterBuilder>CommandParameterBuilder factory.
Returns
- AutocompleteCommandBuilder
The builder instance.
WithCommandName(string)
Sets CommandName.
public AutocompleteCommandBuilder WithCommandName(string name)
Parameters
name
stringNew value of the CommandName.
Returns
- AutocompleteCommandBuilder
The builder instance.
WithParameterName(string)
Sets ParameterName.
public AutocompleteCommandBuilder WithParameterName(string name)
Parameters
name
stringNew value of the ParameterName.
Returns
- AutocompleteCommandBuilder
The builder instance.