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 committed Jan 5, 2024
1 parent 31fcbed commit 88abb7a
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 88abb7a

Please sign in to comment.