diff --git a/PluralKit.Bot/Proxy/ProxyService.cs b/PluralKit.Bot/Proxy/ProxyService.cs
index 31d86b70..90cf0e7e 100644
--- a/PluralKit.Bot/Proxy/ProxyService.cs
+++ b/PluralKit.Bot/Proxy/ProxyService.cs
@@ -177,13 +177,12 @@ namespace PluralKit.Bot
if (msg.Length > 100)
{
msg = repliedTo.Content.Substring(0, 100);
- var openedEmotesInTruncatedString = Regex.Matches(msg, @"").Count;
- if (openedEmotesInTruncatedString != fullEmotesInTruncatedString)
+ var endsWithOpenMention = Regex.IsMatch(msg, @"<[at]?[@#:][!&]?(\w+:)?(\d+)?(:[tTdDfFR])?$");
+ if (endsWithOpenMention)
{
- var emoteTail = repliedTo.Content.Substring(100).Split(">")[0];
- if (Regex.IsMatch(msg + emoteTail, @"";
+ var mentionTail = repliedTo.Content.Substring(100).Split(">")[0];
+ if (Regex.IsMatch(msg + mentionTail, @"<[at]?[@#:][!&]?(\w+:)?\d+(:[tTdDfFR])?$"))
+ msg += mentionTail + ">";
}
var spoilersInOriginalString = Regex.Matches(repliedTo.Content, @"\|\|").Count;