Fix antiraid_level automod trigger not being available
This commit is contained in:
parent
cc795c9742
commit
3afc95c858
2 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,7 @@ export async function runAutomod(pluginData: GuildPluginData<AutomodPluginType>,
|
|||
|
||||
for (const [ruleName, rule] of Object.entries(config.rules)) {
|
||||
if (rule.enabled === false) continue;
|
||||
if (!rule.affects_bots && (!user || user.bot) && !context.counterTrigger) continue;
|
||||
if (!rule.affects_bots && (!user || user.bot) && !context.counterTrigger && !context.antiraid) continue;
|
||||
|
||||
if (rule.cooldown && checkAndUpdateCooldown(pluginData, rule, context)) {
|
||||
continue;
|
||||
|
|
|
@ -26,6 +26,7 @@ import { KickTrigger } from "./kick";
|
|||
import { BanTrigger } from "./ban";
|
||||
import { UnbanTrigger } from "./unban";
|
||||
import { AnyMessageTrigger } from "./anyMessage";
|
||||
import { AntiraidLevelTrigger } from "./antiraidLevel";
|
||||
|
||||
export const availableTriggers: Record<string, AutomodTriggerBlueprint<any, any>> = {
|
||||
any_message: AnyMessageTrigger,
|
||||
|
@ -58,6 +59,8 @@ export const availableTriggers: Record<string, AutomodTriggerBlueprint<any, any>
|
|||
kick: KickTrigger,
|
||||
ban: BanTrigger,
|
||||
unban: UnbanTrigger,
|
||||
|
||||
antiraid_level: AntiraidLevelTrigger,
|
||||
};
|
||||
|
||||
export const AvailableTriggers = t.type({
|
||||
|
@ -91,4 +94,6 @@ export const AvailableTriggers = t.type({
|
|||
kick: KickTrigger.configType,
|
||||
ban: BanTrigger.configType,
|
||||
unban: UnbanTrigger.configType,
|
||||
|
||||
antiraid_level: AntiraidLevelTrigger.configType,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue