invite filtering will block discord.me links now

This commit is contained in:
Kwoth 2016-10-19 05:02:51 +02:00
parent 06cf2f882b
commit c34fd9438c

View File

@ -338,7 +338,7 @@ namespace NadekoBot.Extensions
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)
=> filterRegex.IsMatch(str);