- Removed NadekoCommand and Aliases attribute from all commands

- All commands must be marked as partial
- Added [Cmd] Attribute to all commands
- Cmd Attribute comes from the source generator which adds [NadekoCommand] and [Aliases] Attribute to each command
- Should be updated in the future probably to be more performant and maybe add extra data to the commands
- Started reorganizing modules and submodules
This commit is contained in:
Kwoth
2021-12-31 16:04:12 +01:00
parent 6eee161b6b
commit 25eeffa163
107 changed files with 1620 additions and 3236 deletions

View File

@@ -12,7 +12,7 @@ namespace NadekoBot.Modules.Searches;
public partial class Searches
{
[Group]
public class PathOfExileCommands : NadekoSubmodule<SearchesService>
public partial class PathOfExileCommands : NadekoSubmodule<SearchesService>
{
private const string _poeURL = "https://www.pathofexile.com/character-window/get-characters?accountName=";
private const string _ponURL = "http://poe.ninja/api/Data/GetCurrencyOverview?league=";
@@ -114,9 +114,8 @@ public partial class Searches
public PathOfExileCommands(IHttpClientFactory httpFactory)
=> _httpFactory = httpFactory;
[NadekoCommand]
[Aliases]
public async Task PathOfExile(string usr, string league = "", int page = 1)
[Cmd]
public async partial Task PathOfExile(string usr, string league = "", int page = 1)
{
if (--page < 0)
return;
@@ -177,9 +176,8 @@ public partial class Searches
9);
}
[NadekoCommand]
[Aliases]
public async Task PathOfExileLeagues()
[Cmd]
public async partial Task PathOfExileLeagues()
{
var leagues = new List<Leagues>();
@@ -219,9 +217,8 @@ public partial class Searches
await ctx.Channel.EmbedAsync(embed);
}
[NadekoCommand]
[Aliases]
public async Task PathOfExileCurrency(string leagueName, string currencyName, string convertName = "Chaos Orb")
[Cmd]
public async partial Task PathOfExileCurrency(string leagueName, string currencyName, string convertName = "Chaos Orb")
{
if (string.IsNullOrWhiteSpace(leagueName))
{