mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Global usings and file scoped namespaces
This commit is contained in:
@@ -4,38 +4,37 @@ using System.Threading.Tasks;
|
||||
using NadekoBot.Common.Attributes;
|
||||
using NadekoBot.Modules.Permissions.Services;
|
||||
|
||||
namespace NadekoBot.Modules.Permissions
|
||||
namespace NadekoBot.Modules.Permissions;
|
||||
|
||||
public partial class Permissions
|
||||
{
|
||||
public partial class Permissions
|
||||
[Group]
|
||||
public class ResetPermissionsCommands : NadekoSubmodule
|
||||
{
|
||||
[Group]
|
||||
public class ResetPermissionsCommands : NadekoSubmodule
|
||||
private readonly GlobalPermissionService _gps;
|
||||
private readonly PermissionService _perms;
|
||||
|
||||
public ResetPermissionsCommands(GlobalPermissionService gps, PermissionService perms)
|
||||
{
|
||||
private readonly GlobalPermissionService _gps;
|
||||
private readonly PermissionService _perms;
|
||||
_gps = gps;
|
||||
_perms = perms;
|
||||
}
|
||||
|
||||
public ResetPermissionsCommands(GlobalPermissionService gps, PermissionService perms)
|
||||
{
|
||||
_gps = gps;
|
||||
_perms = perms;
|
||||
}
|
||||
[NadekoCommand, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.Administrator)]
|
||||
public async Task ResetPerms()
|
||||
{
|
||||
await _perms.Reset(ctx.Guild.Id).ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.perms_reset).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.Administrator)]
|
||||
public async Task ResetPerms()
|
||||
{
|
||||
await _perms.Reset(ctx.Guild.Id).ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.perms_reset).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
[OwnerOnly]
|
||||
public async Task ResetGlobalPerms()
|
||||
{
|
||||
await _gps.Reset();
|
||||
await ReplyConfirmLocalizedAsync(strs.global_perms_reset).ConfigureAwait(false);
|
||||
}
|
||||
[NadekoCommand, Aliases]
|
||||
[OwnerOnly]
|
||||
public async Task ResetGlobalPerms()
|
||||
{
|
||||
await _gps.Reset();
|
||||
await ReplyConfirmLocalizedAsync(strs.global_perms_reset).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user