forked from Galactic/galactic-bot
attempt at reducing warnings for invalid domains
This commit is contained in:
parent
c70b41457a
commit
176269ece4
@ -478,7 +478,7 @@ 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) continue;
|
if (!validTld && !match.includes(`${domain}/`)) continue;
|
||||||
const valid = await resolver.validateDomain(domain);
|
const valid = await resolver.validateDomain(domain);
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
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 }) });
|
||||||
|
Loading…
Reference in New Issue
Block a user