mirror of
https://github.com/FoxxMD/context-mod.git
synced 2026-01-13 07:37:53 -05:00
* Add Runs to main docs readme and concepts * Add high level diagram in main docs readme to show CM lifecycle * Refactor subreddit/rule examples to use runs syntax
The Regex rule matches on text content from a comment or submission in the same way automod uses regex. The rule, however, provides additional functionality automod does not:
- Can set the number of matches that trigger the rule (
matchThreshold)
Which can then be used in conjunction with a window to match against activities from the history of the Author of the Activity being checked (including the Activity being checked):
- Can set the number of Activities that meet the
matchThresholdto trigger the rule (activityMatchThreshold) - Can set the number of total matches across all Activities to trigger the rule (
totalMatchThreshold) - Can set the type of Activities to check (
lookAt) - When an Activity is a Submission can specify which parts of the Submission to match against IE title, body, and/or url (
testOn)
Examples
- Trigger if regex matches against the current activity - YAML | JSON
- Trigger if regex matches 5 times against the current activity - YAML | JSON
- Trigger if regex matches against any part of a Submission - YAML | JSON
- Trigger if regex matches any of Author's last 10 activities - YAML | JSON
- Trigger if regex matches at least 3 of Author's last 10 activities - YAML | JSON
- Trigger if there are 5 regex matches in the Author's last 10 activities - YAML | JSON
- Trigger if there are 5 regex matches in the Author's last 10 comments - YAML | JSON
- Remove comments that are spamming discord links - YAML | JSON
- Differs from just using automod because this config can allow one-off/organic links from users who DO NOT spam discord links but will still remove the comment if the user is spamming them