invite filtering will block discord.me links now
This commit is contained in:
parent
06cf2f882b
commit
c34fd9438c
@ -338,7 +338,7 @@ namespace NadekoBot.Extensions
|
|||||||
return imageStream;
|
return imageStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Regex filterRegex = new Regex(@"(?:discord(?:\.gg|app\.com\/invite)\/(?<id>([\w]{16}|(?:[\w]+-?){3})))", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex filterRegex = new Regex(@"(?:discord(?:\.gg|.me|app\.com\/invite)\/(?<id>([\w]{16}|(?:[\w]+-?){3})))", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
public static bool IsDiscordInvite(this string str)
|
public static bool IsDiscordInvite(this string str)
|
||||||
=> filterRegex.IsMatch(str);
|
=> filterRegex.IsMatch(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user