Remove 60+ (whew) SanitizeMentions() calls

This commit is contained in:
Ske
2020-06-20 17:36:03 +02:00
parent 2c35649ef0
commit 378c49cb20
14 changed files with 66 additions and 72 deletions

View File

@@ -44,12 +44,6 @@ namespace PluralKit.Bot
return false;
}
public static string SanitizeMentions(this string input) =>
Regex.Replace(Regex.Replace(input, "<@[!&]?(\\d{17,19})>", "<\u200B@$1>"), "@(everyone|here)", "@\u200B$1");
public static string SanitizeEveryone(this string input) =>
Regex.Replace(input, "@(everyone|here)", "@\u200B$1");
public static string EscapeMarkdown(this string input)
{
Regex pattern = new Regex(@"[*_~>`(||)\\]", RegexOptions.Multiline);