mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -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:
@@ -7,7 +7,7 @@ namespace NadekoBot.Modules.Searches;
|
||||
public partial class Searches
|
||||
{
|
||||
[Group]
|
||||
public class OsuCommands : NadekoSubmodule
|
||||
public partial class OsuCommands : NadekoSubmodule
|
||||
{
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IHttpClientFactory _httpFactory;
|
||||
@@ -18,9 +18,8 @@ public partial class Searches
|
||||
_httpFactory = factory;
|
||||
}
|
||||
|
||||
[NadekoCommand]
|
||||
[Aliases]
|
||||
public async Task Osu(string user, [Leftover] string mode = null)
|
||||
[Cmd]
|
||||
public async partial Task Osu(string user, [Leftover] string mode = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(user))
|
||||
return;
|
||||
@@ -75,9 +74,8 @@ public partial class Searches
|
||||
}
|
||||
}
|
||||
|
||||
[NadekoCommand]
|
||||
[Aliases]
|
||||
public async Task Gatari(string user, [Leftover] string mode = null)
|
||||
[Cmd]
|
||||
public async partial Task Gatari(string user, [Leftover] string mode = null)
|
||||
{
|
||||
using var http = _httpFactory.CreateClient();
|
||||
var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode);
|
||||
@@ -114,9 +112,8 @@ public partial class Searches
|
||||
await ctx.Channel.EmbedAsync(embed);
|
||||
}
|
||||
|
||||
[NadekoCommand]
|
||||
[Aliases]
|
||||
public async Task Osu5(string user, [Leftover] string mode = null)
|
||||
[Cmd]
|
||||
public async partial Task Osu5(string user, [Leftover] string mode = null)
|
||||
{
|
||||
;
|
||||
if (string.IsNullOrWhiteSpace(_creds.OsuApiKey))
|
||||
|
Reference in New Issue
Block a user