mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
chore: PR lint
This commit is contained in:
parent
8d50ae55e7
commit
36873e08ee
1 changed files with 4 additions and 4 deletions
|
|
@ -58,17 +58,17 @@ public class ProxiedMessage
|
|||
// Check if we should append or prepend
|
||||
var append = ctx.MatchFlag("append");
|
||||
var prepend = ctx.MatchFlag("prepend");
|
||||
|
||||
|
||||
// Grab the original message content and new message content
|
||||
var originalContent = originalMsg.Content;
|
||||
var newContent = ctx.RemainderOrNull().NormalizeLineEndSpacing();
|
||||
|
||||
|
||||
// Append or prepend the new content to the original message content if needed.
|
||||
// If no flag is supplied, the new contents will completly overwrite the old contents
|
||||
// If both flags are specified. the message will be prepended AND appended
|
||||
if (append && prepend) newContent = $"{newContent} {originalContent} {newContent}";
|
||||
else if (append) newContent = originalContent +" "+ newContent;
|
||||
else if (prepend) newContent = newContent +" "+ originalContent;
|
||||
else if (append) newContent = originalContent + " " + newContent;
|
||||
else if (prepend) newContent = newContent + " " + originalContent;
|
||||
|
||||
if (newContent.Length > 2000)
|
||||
throw new PKError("PluralKit cannot proxy messages over 2000 characters in length.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue