mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Fix error when trying to edit message in DM without link
This commit is contained in:
parent
dbde8c07ad
commit
239afd9b10
1 changed files with 3 additions and 0 deletions
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue