Table of Contents

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 ModuleBuilder

Parent module of this command.

name string

Name of this command.

callback ExecuteCallback

Execution callback of this command.

Properties

CommandName

Gets the name of the target command.

public string CommandName { get; set; }

Property Value

string

Instance

protected override AutocompleteCommandBuilder Instance { get; }

Property Value

AutocompleteCommandBuilder

ParameterName

Gets the name of the target parameter.

public string ParameterName { get; set; }

Property Value

string

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)

public AutocompleteCommandBuilder WithCommandName(string name)

Parameters

name string

New value of the CommandName.

Returns

AutocompleteCommandBuilder

The builder instance.

WithParameterName(string)

public AutocompleteCommandBuilder WithParameterName(string name)

Parameters

name string

New value of the ParameterName.

Returns

AutocompleteCommandBuilder

The builder instance.