mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Remove 60+ (whew) SanitizeMentions() calls
This commit is contained in:
parent
2c35649ef0
commit
378c49cb20
14 changed files with 66 additions and 72 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue