misc fixes
This commit is contained in:
parent
cfbc651fa0
commit
d0d97173a4
@ -268,14 +268,11 @@ module.exports = class LinkFilter extends FilterSetting {
|
||||
const domains = await resolver.resolveDomains(params.map((word) => word.toLowerCase()));
|
||||
const removed = [];
|
||||
for (const domain of [...domains]) {
|
||||
console.log(domain)
|
||||
const existing = actions.find((ac) => ac.trigger.includes(domain));
|
||||
console.log(existing)
|
||||
if (!existing) continue;
|
||||
domains.splice(domains.indexOf(domain), 1);
|
||||
removed.push(domain);
|
||||
}
|
||||
console.log(domains)
|
||||
actionObject.trigger = domains;
|
||||
if (removed.length) message.formattedRespond('S_LINKFILTER_DOMAIN_IN_ACTION', { params: { domains: removed.join('`, `') } });
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ class ModerationLogsSetting extends Setting {
|
||||
const result = await this.client.resolver.list(
|
||||
setting.infractions,
|
||||
Object.keys(InfractionResolves),
|
||||
params, this.client.resolver.resolveInfractions.bind(this.client.resolver)
|
||||
params,
|
||||
this.client.resolver.resolveInfractions.bind(this.client.resolver)
|
||||
);
|
||||
|
||||
if(result) {
|
||||
|
@ -117,7 +117,7 @@ module.exports = class FilterSetting extends Setting {
|
||||
}
|
||||
}
|
||||
|
||||
//Which words should trigger the action?
|
||||
//What should trigger the action?
|
||||
//Implemented in the subclass
|
||||
const result = await this._createTrigger(message, action, actionObject, setting);
|
||||
if (result && result.error) return result;
|
||||
|
Loading…
Reference in New Issue
Block a user