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:
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";
|
||||
|
||||
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);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue