mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
- 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:
@@ -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())
|
||||
{
|
||||
|
Reference in New Issue
Block a user