Restructured the project structure back to the way it was, there's no reasonable way to split the modules

This commit is contained in:
Kwoth
2024-04-26 22:26:24 +00:00
parent 6c9c8bf63e
commit e0819f760c
768 changed files with 192 additions and 1047 deletions

View File

@@ -0,0 +1,37 @@
#nullable disable
using NadekoBot.Modules.Permissions.Services;
namespace NadekoBot.Modules.Permissions;
public partial class Permissions
{
[Group]
public partial class ResetPermissionsCommands : NadekoModule
{
private readonly GlobalPermissionService _gps;
private readonly PermissionService _perms;
public ResetPermissionsCommands(GlobalPermissionService gps, PermissionService perms)
{
_gps = gps;
_perms = perms;
}
[Cmd]
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
public async Task ResetPerms()
{
await _perms.Reset(ctx.Guild.Id);
await ReplyConfirmLocalizedAsync(strs.perms_reset);
}
[Cmd]
[OwnerOnly]
public async Task ResetGlobalPerms()
{
await _gps.Reset();
await ReplyConfirmLocalizedAsync(strs.global_perms_reset);
}
}
}