2020-07-28 21:34:01 +03:00
|
|
|
import * as t from "io-ts";
|
2021-04-02 17:52:50 +03:00
|
|
|
import { tNullable } from "../../../utils";
|
2021-06-06 23:51:32 +02:00
|
|
|
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
|
|
|
|
import { automodAction } from "../helpers";
|
2020-07-28 21:34:01 +03:00
|
|
|
|
|
|
|
export const SetAntiraidLevelAction = automodAction({
|
2021-04-02 17:52:50 +03:00
|
|
|
configType: tNullable(t.string),
|
2020-11-09 20:03:57 +02:00
|
|
|
defaultConfig: "",
|
2020-07-28 21:34:01 +03:00
|
|
|
|
|
|
|
async apply({ pluginData, contexts, actionConfig }) {
|
2021-04-02 17:52:50 +03:00
|
|
|
setAntiraidLevel(pluginData, actionConfig ?? null);
|
2020-07-28 21:34:01 +03:00
|
|
|
},
|
|
|
|
});
|