mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
automod: allow setting antiraid level to null/off with set_antiraid_level action
This commit is contained in:
parent
4147298120
commit
13294ad351
1 changed files with 3 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
|||
import * as t from "io-ts";
|
||||
import { automodAction } from "../helpers";
|
||||
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
|
||||
import { tNullable } from "../../../utils";
|
||||
|
||||
export const SetAntiraidLevelAction = automodAction({
|
||||
configType: t.string,
|
||||
configType: tNullable(t.string),
|
||||
defaultConfig: "",
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
setAntiraidLevel(pluginData, actionConfig);
|
||||
setAntiraidLevel(pluginData, actionConfig ?? null);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue