run dotnet format

This commit is contained in:
spiral
2021-08-27 11:03:47 -04:00
parent 05989242f9
commit ac2671452d
278 changed files with 1913 additions and 1808 deletions

View File

@@ -1,4 +1,4 @@
using Myriad.Types;
using Myriad.Types;
using PluralKit.Core;
@@ -11,27 +11,27 @@ namespace PluralKit.Bot
if (ctx.Channel.GuildId != null) return ctx;
throw new PKError("This command can not be run in a DM.");
}
public static Context CheckSystemPrivacy(this Context ctx, PKSystem target, PrivacyLevel level)
{
if (level.CanAccess(ctx.LookupContextFor(target))) return ctx;
throw new PKError("You do not have permission to access this information.");
}
public static Context CheckOwnMember(this Context ctx, PKMember member)
{
if (member.System != ctx.System?.Id)
throw Errors.NotOwnMemberError;
return ctx;
}
public static Context CheckOwnGroup(this Context ctx, PKGroup group)
{
if (group.System != ctx.System?.Id)
throw Errors.NotOwnGroupError;
return ctx;
}
public static Context CheckSystem(this Context ctx)
{
if (ctx.System == null)
@@ -45,7 +45,7 @@ namespace PluralKit.Bot
throw Errors.ExistingSystemError;
return ctx;
}
public static Context CheckAuthorPermission(this Context ctx, PermissionSet neededPerms, string permissionName)
{
if ((ctx.UserPermissions & neededPerms) != neededPerms)