private Task <bool> ScanForUrlShortenersAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.UrlShortenerRegex.Match(e.Message); return(match.Success ? this.DeleteAsync(e, "URL shortener website", match) : Task.FromResult(false)); }
private Task <bool> ScanForDisturbingSitesAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.DisturbingWebsiteMatcher.Match(e.Message); return(match.Success ? this.DeleteAsync(e, "Disturbing content website", match) : Task.FromResult(false)); }
private Task <bool> ScanForIpLoggersAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.IpLoggerMatcher.Match(e.Message); return(match.Success ? this.DeleteAsync(e, "IP logging website", match) : Task.FromResult(false)); }
private async Task <bool> ScanForDisturbingSitesAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.DisturbingWebsiteMatcher.Check(e.Message); if (!match.Success) { return(false); } await this.DeleteAsync(e, "Disturbing content website", Formatter.InlineCode(match.Matched)); return(true); }
private async Task <bool> ScanForIpLoggersAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.IpLoggerMatcher.Check(e.Message); if (!match.Success) { return(false); } await this.DeleteAsync(e, "IP logging website", Formatter.InlineCode(match.Matched)); return(true); }
private async Task <bool> ScanForUrlShortenersAsync(MessageCreateEventArgs e) { LinkfilterMatch match = LinkfilterMatcherCollection.UrlShortenerRegex.Check(e.Message); if (!match.Success) { return(false); } await this.DeleteAsync(e, "URL shortener website", $"{Formatter.InlineCode(match.Matched)} (possible origin: {LinkfilterMatcherCollection.UrlShorteners[match.Matched]}).\n\nIf you think this is a false detection, please report."); return(true); }