3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-06 18:47:20 +00:00

fix: make options an object, else setting an action to false ignores it

This commit is contained in:
Ben Richeson 2023-08-30 15:35:18 -04:00
parent 31fcbed7b9
commit 88abb7a9da
No known key found for this signature in database
GPG key ID: 5CE9197BA65BF9B8

View file

@ -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);
},
});