An AddSlashCommand overload should be AddAutocompleteCommand in ModuleBuilder (#3014)
This commit is contained in:
@@ -371,6 +371,11 @@ namespace Discord.Interactions.Builders
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Discord.Interactions.Builders.ModuleBuilder.AddAutocompleteCommand(System.String,Discord.Interactions.ExecuteCallback,System.Action{Discord.Interactions.Builders.AutocompleteCommandBuilder})" />
|
||||
[Obsolete("This method will be deprecated soon. Use AddAutocompleteCommand instead.")]
|
||||
public ModuleBuilder AddSlashCommand(string name, ExecuteCallback callback, Action<AutocompleteCommandBuilder> configure)
|
||||
=> AddAutocompleteCommand(name, callback, configure);
|
||||
|
||||
/// <summary>
|
||||
/// Adds autocomplete command builder to <see cref="AutocompleteCommands"/>.
|
||||
/// </summary>
|
||||
@@ -380,7 +385,7 @@ namespace Discord.Interactions.Builders
|
||||
/// <returns>
|
||||
/// The builder instance.
|
||||
/// </returns>
|
||||
public ModuleBuilder AddSlashCommand(string name, ExecuteCallback callback, Action<AutocompleteCommandBuilder> configure)
|
||||
public ModuleBuilder AddAutocompleteCommand(string name, ExecuteCallback callback, Action<AutocompleteCommandBuilder> configure)
|
||||
{
|
||||
var command = new AutocompleteCommandBuilder(this, name, callback);
|
||||
configure(command);
|
||||
@@ -403,7 +408,7 @@ namespace Discord.Interactions.Builders
|
||||
_modalCommands.Add(command);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds a modal command builder to <see cref="ModalCommands"/>.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user