make linkfilter use ratelimiter
This commit is contained in:
parent
2927c6fb43
commit
aad813d8ac
@ -327,7 +327,7 @@ module.exports = class AutoModeration extends Observer {
|
||||
const member = message.member || await guild.members.fetch(author.id).catch();
|
||||
const { resolver } = this.client;
|
||||
const settings = await guild.settings();
|
||||
const { linkFilter: setting, moderationPoints } = settings;
|
||||
const { linkFilter: setting } = settings;
|
||||
const { bypass, ignore, actions, silent, enabled, blacklist, whitelist, mode } = setting;
|
||||
if (!enabled) return;
|
||||
const roles = member?.roles.cache.map((r) => r.id) || [];
|
||||
@ -389,7 +389,7 @@ module.exports = class AutoModeration extends Observer {
|
||||
return act.trigger === 'generic';
|
||||
});
|
||||
|
||||
if (!action) return msg.delete();
|
||||
if (!action) this.client.rateLimiter.queueDelete(msg.channel, msg);
|
||||
|
||||
msg.filtered.sanctioned = true;
|
||||
this.client.rateLimiter.queueDelete(msg.channel, msg);
|
||||
|
Loading…
Reference in New Issue
Block a user