3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Automod work

This commit is contained in:
Dragory 2020-07-27 20:42:10 +03:00
parent 140ba84544
commit f657b169df
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
32 changed files with 1099 additions and 5 deletions

View file

@ -0,0 +1,37 @@
import * as t from "io-ts";
import { MatchWordsTrigger } from "./matchWords";
import { AutomodTriggerBlueprint } from "../helpers";
import { MessageSpamTrigger } from "./messageSpam";
import { MentionSpamTrigger } from "./mentionSpam";
import { LinkSpamTrigger } from "./linkSpam";
import { AttachmentSpamTrigger } from "./attachmentSpam";
import { EmojiSpamTrigger } from "./emojiSpam";
import { LineSpamTrigger } from "./lineSpam";
import { CharacterSpamTrigger } from "./characterSpam";
import { MatchRegexTrigger } from "./matchRegex";
export const availableTriggers: Record<string, AutomodTriggerBlueprint<any, any>> = {
match_words: MatchWordsTrigger,
match_regex: MatchRegexTrigger,
message_spam: MessageSpamTrigger,
mention_spam: MentionSpamTrigger,
link_spam: LinkSpamTrigger,
attachment_spam: AttachmentSpamTrigger,
emoji_spam: EmojiSpamTrigger,
line_spam: LineSpamTrigger,
character_spam: CharacterSpamTrigger,
};
export const AvailableTriggers = t.type({
match_words: MatchWordsTrigger.configType,
match_regex: MatchRegexTrigger.configType,
message_spam: MessageSpamTrigger.configType,
mention_spam: MentionSpamTrigger.configType,
link_spam: LinkSpamTrigger.configType,
attachment_spam: AttachmentSpamTrigger.configType,
emoji_spam: EmojiSpamTrigger.configType,
line_spam: LineSpamTrigger.configType,
character_spam: CharacterSpamTrigger.configType,
});