mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: don't crash when trying to log edited message with no old content
This commit is contained in:
parent
b75e59da2f
commit
5833e7644d
1 changed files with 3 additions and 0 deletions
|
|
@ -144,6 +144,9 @@ public class EmbedService
|
|||
$"System ID: {systemHid} | Member ID: {member.Hid} | Sender: {triggerMessage.Author.Username}#{triggerMessage.Author.Discriminator} ({triggerMessage.Author.Id}) | Message ID: {proxiedMessage.Id} | Original Message ID: {triggerMessage.Id}"))
|
||||
.Timestamp(timestamp.ToDateTimeOffset().ToString("O"));
|
||||
|
||||
if (oldContent == "")
|
||||
oldContent = "*no message content*";
|
||||
|
||||
if (oldContent != null)
|
||||
embed.Field(new Embed.Field("Old message", oldContent?.NormalizeLineEndSpacing().Truncate(1000)));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue