mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Merge pull request #327 from spiralw/fix/msg-edit-dm
Fix error when trying to edit message in DM without link
This commit is contained in:
commit
74128ee4c4
1 changed files with 3 additions and 0 deletions
|
|
@ -73,6 +73,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