Skip to content

Commit

Permalink
Minor fix for starboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Naamloos committed Dec 15, 2022
1 parent 56d803f commit 21b7d17
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ModCore/Listeners/Reactions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,15 @@ private static DiscordMessageBuilder buildMessage(DiscordMessage message, Discor

if(message.ReferencedMessage != null)
{
var refContent = message.ReferencedMessage.Content.Truncate(200, "...");
var refContent = message.ReferencedMessage.Content.Truncate(200, "...").Replace(")[", "​)[");

embed.AddField("↳ Reply", $"{(message.ReferencedMessage.Attachments.Count() > 0? "📜 " : "")}" +
$"{message.ReferencedMessage.Author.Username}#{message.ReferencedMessage.Author.Discriminator}: {refContent} ([Jump]({message.ReferencedMessage}))");
if(string.IsNullOrEmpty(refContent))
{
refContent = "_< no text >_";
}

embed.AddField("↳ Reply to", $"{(message.ReferencedMessage.Attachments.Count() > 0? "🖼 " : "")}" +
$"{message.ReferencedMessage.Author.Username}: {refContent} ([Jump]({message.ReferencedMessage.JumpLink}))");
}

var messageBuilder = new DiscordMessageBuilder()
Expand Down

0 comments on commit 21b7d17

Please sign in to comment.