From f3f391239fae5124f93363b9be2948f93422ee3b Mon Sep 17 00:00:00 2001 From: Ben Richeson Date: Wed, 30 Aug 2023 15:35:18 -0400 Subject: [PATCH] fix: make options an object, else setting an action to `false` ignores it --- backend/src/plugins/Automod/actions/pauseInvites.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/plugins/Automod/actions/pauseInvites.ts b/backend/src/plugins/Automod/actions/pauseInvites.ts index 87d927ced..1bbea34fa 100644 --- a/backend/src/plugins/Automod/actions/pauseInvites.ts +++ b/backend/src/plugins/Automod/actions/pauseInvites.ts @@ -2,10 +2,13 @@ import * as t from "io-ts"; import { automodAction } from "../helpers"; export const PauseInvitesAction = automodAction({ - configType: t.boolean, - defaultConfig: true, + configType: t.type({ + paused: t.boolean, + }), + + defaultConfig: {}, async apply({ pluginData, actionConfig }) { - await pluginData.guild.disableInvites(actionConfig); + await pluginData.guild.disableInvites(actionConfig.paused); }, });