From 50f94658267e144f4a2829e0bbbcd8c30a6fd251 Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 24 Dec 2021 19:28:46 -0500 Subject: [PATCH] fix: missing checkownsystem in pk;s icon --- PluralKit.Bot/Commands/SystemEdit.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PluralKit.Bot/Commands/SystemEdit.cs b/PluralKit.Bot/Commands/SystemEdit.cs index b58cb533..708af0e0 100644 --- a/PluralKit.Bot/Commands/SystemEdit.cs +++ b/PluralKit.Bot/Commands/SystemEdit.cs @@ -81,8 +81,6 @@ public class SystemEdit if (isOwnSystem) noDescriptionSetMessage += " To set one, type `pk;s description `."; - ctx.CheckSystem().CheckOwnSystem(target); - if (ctx.MatchRaw()) { if (target.Description == null) @@ -345,9 +343,6 @@ public class SystemEdit public async Task Avatar(Context ctx, PKSystem target) { - if (target == null) - ctx.CheckSystem(); - async Task ClearIcon() { ctx.CheckOwnSystem(target); @@ -358,6 +353,8 @@ public class SystemEdit async Task SetIcon(ParsedImage img) { + ctx.CheckOwnSystem(target); + await AvatarUtils.VerifyAvatarOrThrow(_client, img.Url); await _repo.UpdateSystem(target.Id, new SystemPatch { AvatarUrl = img.Url });