Class AutocompleteCommandBuilder
Represents a builder for creating AutocompleteCommandInfo.
Inheritance
AutocompleteCommandBuilder
Implements
Inherited Members
Namespace: Discord.Interactions.Builders
Assembly: Discord.Net.Interactions.dll
Syntax
public sealed class AutocompleteCommandBuilder : CommandBuilder<AutocompleteCommandInfo, AutocompleteCommandBuilder, CommandParameterBuilder>, ICommandBuilder
Constructors
| Improve this Doc View SourceAutocompleteCommandBuilder(ModuleBuilder, String, ExecuteCallback)
Initializes a new AutocompleteCommandBuilder.
Declaration
public AutocompleteCommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback)
Parameters
Type | Name | Description |
---|---|---|
ModuleBuilder | module | Parent module of this command. |
String | name | Name of this command. |
ExecuteCallback | callback | Execution callback of this command. |
Properties
| Improve this Doc View SourceCommandName
Gets the name of the target command.
Declaration
public string CommandName { get; set; }
Property Value
Type | Description |
---|---|
String |
Instance
Declaration
protected override AutocompleteCommandBuilder Instance { get; }
Property Value
Type | Description |
---|---|
AutocompleteCommandBuilder |
Overrides
Discord.Interactions.Builders.CommandBuilder<Discord.Interactions.AutocompleteCommandInfo, Discord.Interactions.Builders.AutocompleteCommandBuilder, Discord.Interactions.Builders.CommandParameterBuilder>.Instance
|
Improve this Doc
View Source
ParameterName
Gets the name of the target parameter.
Declaration
public string ParameterName { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceAddParameter(Action<CommandParameterBuilder>)
Adds a command parameter to the parameters collection.
Declaration
public override AutocompleteCommandBuilder AddParameter(Action<CommandParameterBuilder> configure)
Parameters
Type | Name | Description |
---|---|---|
Action<CommandParameterBuilder> | configure | CommandParameterBuilder factory. |
Returns
Type | Description |
---|---|
AutocompleteCommandBuilder | The builder instance. |
Overrides
Discord.Interactions.Builders.CommandBuilder<Discord.Interactions.AutocompleteCommandInfo, Discord.Interactions.Builders.AutocompleteCommandBuilder, Discord.Interactions.Builders.CommandParameterBuilder>.AddParameter(Action<Discord.Interactions.Builders.CommandParameterBuilder>)
|
Improve this Doc
View Source
WithCommandName(String)
Sets CommandName.
Declaration
public AutocompleteCommandBuilder WithCommandName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | New value of the CommandName. |
Returns
Type | Description |
---|---|
AutocompleteCommandBuilder | The builder instance. |
WithParameterName(String)
Sets ParameterName.
Declaration
public AutocompleteCommandBuilder WithParameterName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | New value of the ParameterName. |
Returns
Type | Description |
---|---|
AutocompleteCommandBuilder | The builder instance. |