added the link think to the wrong line

This commit is contained in:
Erik 2022-07-12 21:16:29 +03:00
parent 2d361fb523
commit 67e796d334
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -478,9 +478,9 @@ module.exports = class AutoModeration extends Observer {
const parts = domain.split('.'); const parts = domain.split('.');
const validTld = this.topLevelDomains.find(parts[parts.length - 1]); const validTld = this.topLevelDomains.find(parts[parts.length - 1]);
// console.log(parts, validTld); // console.log(parts, validTld);
if (!validTld && !match.includes(`${domain}/`)) continue; if (!validTld) continue;
const valid = await resolver.validateDomain(domain); const valid = await resolver.validateDomain(domain);
if (!valid) { if (!valid && match.includes(`${domain}/`)) {
this.client.emit('linkFilterWarn', { guild: wrapper, message: wrapper.format('LINKFILTER_WARN', { domain, link: match }) }); this.client.emit('linkFilterWarn', { guild: wrapper, message: wrapper.format('LINKFILTER_WARN', { domain, link: match }) });
continue; continue;
} }