Skip to content

Commit

Permalink
fix: make options an object, else setting an action to false ignore…
Browse files Browse the repository at this point in the history
…s it
  • Loading branch information
Benricheson101 authored and metal0 committed Dec 27, 2023
1 parent f483665 commit 60111c0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/src/plugins/Automod/actions/pauseInvites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
});

0 comments on commit 60111c0

Please sign in to comment.