예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }