From 8ab6538744abe89b47330c98cbeee0c2476ffcc6 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 23 May 2021 17:15:15 +0300 Subject: [PATCH] Fix antiraid_level override --- backend/src/plugins/Automod/AutomodPlugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts index 5efa6114..fabdc806 100644 --- a/backend/src/plugins/Automod/AutomodPlugin.ts +++ b/backend/src/plugins/Automod/AutomodPlugin.ts @@ -169,8 +169,10 @@ export const AutomodPlugin = zeppelinGuildPlugin()({ defaultOptions, configPreprocessor, - customOverrideMatcher(pluginData, criteria, matchParams) { - return criteria?.antiraid_level ? criteria.antiraid_level === pluginData.state.cachedAntiraidLevel : false; + customOverrideCriteriaFunctions: { + antiraid_level: (pluginData, matchParams, value) => { + return value ? value === pluginData.state.cachedAntiraidLevel : false; + }, }, // prettier-ignore