mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
fix: correctly throw missing content error in pk;edit
This commit is contained in:
parent
5627fa9864
commit
91213faa50
1 changed files with 2 additions and 1 deletions
|
|
@ -46,10 +46,11 @@ public class ProxiedMessage
|
||||||
|
|
||||||
public async Task EditMessage(Context ctx)
|
public async Task EditMessage(Context ctx)
|
||||||
{
|
{
|
||||||
var msg = await GetMessageToEdit(ctx);
|
|
||||||
if (!ctx.HasNext())
|
if (!ctx.HasNext())
|
||||||
throw new PKSyntaxError("You need to include the message to edit in.");
|
throw new PKSyntaxError("You need to include the message to edit in.");
|
||||||
|
|
||||||
|
var msg = await GetMessageToEdit(ctx);
|
||||||
|
|
||||||
if (ctx.System.Id != msg.System.Id)
|
if (ctx.System.Id != msg.System.Id)
|
||||||
throw new PKError("Can't edit a message sent by a different system.");
|
throw new PKError("Can't edit a message sent by a different system.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue