mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
automod: add antiraid_level trigger
This commit is contained in:
parent
13294ad351
commit
b28186aa0a
5 changed files with 114 additions and 0 deletions
|
@ -4,6 +4,7 @@ import { AutomodPluginType } from "../types";
|
|||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { stripObjectToScalars } from "../../../utils";
|
||||
import { runAutomodOnAntiraidLevel } from "../events/runAutomodOnAntiraidLevel";
|
||||
|
||||
export async function setAntiraidLevel(
|
||||
pluginData: GuildPluginData<AutomodPluginType>,
|
||||
|
@ -13,6 +14,8 @@ export async function setAntiraidLevel(
|
|||
pluginData.state.cachedAntiraidLevel = newLevel;
|
||||
await pluginData.state.antiraidLevels.set(newLevel);
|
||||
|
||||
runAutomodOnAntiraidLevel(pluginData, newLevel);
|
||||
|
||||
const logs = pluginData.getPlugin(LogsPlugin);
|
||||
|
||||
if (user) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue