linkfilter debug stuff

This commit is contained in:
Erik 2022-07-02 15:27:16 +03:00
parent 79ced983da
commit 281d20b867
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -526,11 +526,13 @@ module.exports = class AutoModeration extends Observer {
};
if (blacklist.some(predicate)) {
log += 'in blacklist';
filterResult.match = domain;
filterResult.matcher = 'link blacklist';
remove = true;
break;
} else if (greylist.some(predicate)) {
log += 'in greylist';
filterResult.match = domain;
filterResult.matcher = 'link greylist';
remove = true;
@ -540,9 +542,10 @@ module.exports = class AutoModeration extends Observer {
log += 'in whitelist';
continue;
}
const valid = await resolver.validateDomain(domain);
if (!valid) {
this.client.emit('linkFilterWarn', { message: wrapper.format('LINKFILTER_WARN', { domain }) });
this.client.emit('linkFilterWarn', { guild: wrapper, message: wrapper.format('LINKFILTER_WARN', { domain }) });
continue;
}