- 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

@@ -6,7 +6,7 @@ namespace NadekoBot.Modules.Searches;
public partial class Searches
{
[Group]
public class XkcdCommands : NadekoSubmodule
public partial class XkcdCommands : NadekoSubmodule
{
private const string _xkcdUrl = "https://xkcd.com";
private readonly IHttpClientFactory _httpFactory;
@@ -14,10 +14,9 @@ public partial class Searches
public XkcdCommands(IHttpClientFactory factory)
=> _httpFactory = factory;
[NadekoCommand]
[Aliases]
[Cmd]
[Priority(0)]
public async Task Xkcd(string arg = null)
public async partial Task Xkcd(string arg = null)
{
if (arg?.ToLowerInvariant().Trim() == "latest")
{
@@ -49,10 +48,9 @@ public partial class Searches
await Xkcd(new NadekoRandom().Next(1, 1750));
}
[NadekoCommand]
[Aliases]
[Cmd]
[Priority(1)]
public async Task Xkcd(int num)
public async partial Task Xkcd(int num)
{
if (num < 1)
return;