fix: correctly throw missing content error in pk;edit
This commit is contained in:
parent
5627fa9864
commit
91213faa50
@ -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…
Reference in New Issue
Block a user