Discord.Net icon indicating copy to clipboard operation
Discord.Net copied to clipboard

An AddSlashCommand overload should be AddAutocompleteCommand in ModuleBuilder

Open gehongyan opened this issue 1 year ago • 0 comments

Description

In ModuleBuidler, an overload for adding autocomplete command was named AddSlashCommand instead of AddAutocompleteCommand. This pull request would like to correct the method name while maintaining backward compatibility.

https://github.com/discord-net/Discord.Net/blob/de8da0d3b998d32e248e5e438039d266139e4776/src/Discord.Net.Interactions/Builders/ModuleBuilder.cs#L373-L389

Changes

  • Renamed the method called AddSlashCommand to AddAutocompleteCommand to better reflect its functionality.
  • Introduced a new AddAutocompleteCommand method to supersede the original functionality.
  • Added an Obsolete attribute to the AddSlashCommand method.

gehongyan avatar Sep 20 '24 16:09 gehongyan