From 91213faa50b599cfe51d774cb098d038a5b3563c Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 7 Jan 2022 14:06:37 -0500 Subject: [PATCH] fix: correctly throw missing content error in pk;edit --- PluralKit.Bot/Commands/Message.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/Message.cs b/PluralKit.Bot/Commands/Message.cs index 0262a51d..c698a74b 100644 --- a/PluralKit.Bot/Commands/Message.cs +++ b/PluralKit.Bot/Commands/Message.cs @@ -46,10 +46,11 @@ public class ProxiedMessage public async Task EditMessage(Context ctx) { - var msg = await GetMessageToEdit(ctx); if (!ctx.HasNext()) throw new PKSyntaxError("You need to include the message to edit in."); + var msg = await GetMessageToEdit(ctx); + if (ctx.System.Id != msg.System.Id) throw new PKError("Can't edit a message sent by a different system.");