- 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,29 +6,25 @@ namespace NadekoBot.Modules.Searches;
public partial class Searches
{
[Group]
public class JokeCommands : NadekoSubmodule<SearchesService>
public partial class JokeCommands : NadekoSubmodule<SearchesService>
{
[NadekoCommand]
[Aliases]
public async Task Yomama()
[Cmd]
public async partial Task Yomama()
=> await SendConfirmAsync(await _service.GetYomamaJoke());
[NadekoCommand]
[Aliases]
public async Task Randjoke()
[Cmd]
public async partial Task Randjoke()
{
var (setup, punchline) = await _service.GetRandomJoke();
await SendConfirmAsync(setup, punchline);
}
[NadekoCommand]
[Aliases]
public async Task ChuckNorris()
[Cmd]
public async partial Task ChuckNorris()
=> await SendConfirmAsync(await _service.GetChuckNorrisJoke());
[NadekoCommand]
[Aliases]
public async Task WowJoke()
[Cmd]
public async partial Task WowJoke()
{
if (!_service.WowJokes.Any())
{
@@ -40,9 +36,8 @@ public partial class Searches
await SendConfirmAsync(joke.Question, joke.Answer);
}
[NadekoCommand]
[Aliases]
public async Task MagicItem()
[Cmd]
public async partial Task MagicItem()
{
if (!_service.WowJokes.Any())
{