- 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.Permissions;
public partial class Permissions
{
[Group]
public class ResetPermissionsCommands : NadekoSubmodule
public partial class ResetPermissionsCommands : NadekoSubmodule
{
private readonly GlobalPermissionService _gps;
private readonly PermissionService _perms;
@@ -17,20 +17,18 @@ public partial class Permissions
_perms = perms;
}
[NadekoCommand]
[Aliases]
[Cmd]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ResetPerms()
public async partial Task ResetPerms()
{
await _perms.Reset(ctx.Guild.Id);
await ReplyConfirmLocalizedAsync(strs.perms_reset);
}
[NadekoCommand]
[Aliases]
[Cmd]
[OwnerOnly]
public async Task ResetGlobalPerms()
public async partial Task ResetGlobalPerms()
{
await _gps.Reset();
await ReplyConfirmLocalizedAsync(strs.global_perms_reset);