forked from Galactic/galactic-bot
linkfilter debug stuff
This commit is contained in:
parent
79ced983da
commit
281d20b867
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user