Fix error when trying to edit message in DM without link

This commit is contained in:
spiral 2021-05-07 22:31:43 +01:00
parent dbde8c07ad
commit 239afd9b10
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -67,6 +67,9 @@ namespace PluralKit.Bot
return msg.Message;
}
if (ctx.Guild == null)
throw new PKError("You must use a message link to edit messages in DMs.");
var recent = await FindRecentMessage(ctx);
if (recent == null)
throw new PKError("Could not find a recent message to edit.");