From aad813d8ac655d9f9e08edeedd7b88add3496c8f Mon Sep 17 00:00:00 2001 From: Navy Date: Mon, 21 Jun 2021 12:00:28 +0300 Subject: [PATCH] make linkfilter use ratelimiter --- structure/client/components/observers/Automoderation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/structure/client/components/observers/Automoderation.js b/structure/client/components/observers/Automoderation.js index 28d47f0..5780093 100644 --- a/structure/client/components/observers/Automoderation.js +++ b/structure/client/components/observers/Automoderation.js @@ -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);