From 176269ece4cf02334902df61f941995646a66052 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 12 Jul 2022 12:58:54 +0300 Subject: [PATCH] attempt at reducing warnings for invalid domains --- src/structure/components/observers/Automoderation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structure/components/observers/Automoderation.js b/src/structure/components/observers/Automoderation.js index 613b0a2..af0c7b6 100644 --- a/src/structure/components/observers/Automoderation.js +++ b/src/structure/components/observers/Automoderation.js @@ -478,7 +478,7 @@ module.exports = class AutoModeration extends Observer { const parts = domain.split('.'); const validTld = this.topLevelDomains.find(parts[parts.length - 1]); // console.log(parts, validTld); - if (!validTld) continue; + if (!validTld && !match.includes(`${domain}/`)) continue; const valid = await resolver.validateDomain(domain); if (!valid) { this.client.emit('linkFilterWarn', { guild: wrapper, message: wrapper.format('LINKFILTER_WARN', { domain, link: match }) });