mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-13 21:35:02 +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
|
@ -0,0 +1,16 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { AutomodContext, AutomodPluginType } from "../types";
|
||||
import { runAutomod } from "../functions/runAutomod";
|
||||
|
||||
export async function runAutomodOnAntiraidLevel(pluginData: GuildPluginData<AutomodPluginType>, level: string | null) {
|
||||
const context: AutomodContext = {
|
||||
timestamp: Date.now(),
|
||||
antiraid: {
|
||||
level,
|
||||
},
|
||||
};
|
||||
|
||||
pluginData.state.queue.add(async () => {
|
||||
await runAutomod(pluginData, context);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue