mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: throw error when pk;edit message is too long
This commit is contained in:
parent
cb1d4c98c7
commit
91256368f5
1 changed files with 3 additions and 0 deletions
|
|
@ -55,6 +55,9 @@ public class ProxiedMessage
|
|||
|
||||
var newContent = ctx.RemainderOrNull().NormalizeLineEndSpacing();
|
||||
|
||||
if (newContent.Length > 2000)
|
||||
throw new PKError("PluralKit cannot proxy messages over 2000 characters in length.");
|
||||
|
||||
var originalMsg = await _rest.GetMessageOrNull(msg.Message.Channel, msg.Message.Mid);
|
||||
if (originalMsg == null)
|
||||
throw new PKError("Could not edit message.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue