mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 11:07:19 +00:00
fix: make options an object, else setting an action to false
ignores it
This commit is contained in:
parent
31fcbed7b9
commit
88abb7a9da
1 changed files with 6 additions and 3 deletions
|
@ -2,10 +2,13 @@ import * as t from "io-ts";
|
||||||
import { automodAction } from "../helpers";
|
import { automodAction } from "../helpers";
|
||||||
|
|
||||||
export const PauseInvitesAction = automodAction({
|
export const PauseInvitesAction = automodAction({
|
||||||
configType: t.boolean,
|
configType: t.type({
|
||||||
defaultConfig: true,
|
paused: t.boolean,
|
||||||
|
}),
|
||||||
|
|
||||||
|
defaultConfig: {},
|
||||||
|
|
||||||
async apply({ pluginData, actionConfig }) {
|
async apply({ pluginData, actionConfig }) {
|
||||||
await pluginData.guild.disableInvites(actionConfig);
|
await pluginData.guild.disableInvites(actionConfig.paused);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue