attempt at reducing warnings for invalid domains

This commit is contained in:
Erik 2022-07-12 12:58:54 +03:00
parent c70b41457a
commit 176269ece4
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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 }) });