Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An AddSlashCommand overload should be AddAutocompleteCommand in ModuleBuilder #3014

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Discord.Net.Interactions/Builders/ModuleBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ public ModuleBuilder AddAutocompleteCommand(Action<AutocompleteCommandBuilder> c
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>
Expand All @@ -379,7 +384,7 @@ public ModuleBuilder AddAutocompleteCommand(Action<AutocompleteCommandBuilder> c
/// <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);
Expand All @@ -402,7 +407,7 @@ public ModuleBuilder AddModalCommand(Action<ModalCommandBuilder> configure)
_modalCommands.Add(command);
return this;
}

/// <summary>
/// Adds a modal command builder to <see cref="ModalCommands"/>.
/// </summary>
Expand Down