mirror of
https://github.com/FoxxMD/context-mod.git
synced 2026-04-19 03:00:07 -04: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
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
{
|
|
"runs": [
|
|
{
|
|
"checks": [
|
|
{
|
|
"name": "Free Karma Alert",
|
|
"description": "Check if author has posted in 'freekarma' subreddits",
|
|
// check will run on a new submission in your subreddit and look at the Author of that submission
|
|
"kind": "submission",
|
|
"rules": [
|
|
{
|
|
"name": "freekarma",
|
|
"kind": "recentActivity",
|
|
"useSubmissionAsReference": false,
|
|
// when `lookAt` is not present this rule will look for submissions and comments
|
|
// lookAt: "submissions"
|
|
// lookAt: "comments"
|
|
"thresholds": [
|
|
{
|
|
// for all subreddits, if the number of activities (sub/comment) is equal to or greater than 1 then the rule is triggered
|
|
"threshold": ">= 1",
|
|
"subreddits": [
|
|
"DeFreeKarma",
|
|
"FreeKarma4U",
|
|
"FreeKarma4You",
|
|
"upvote"
|
|
]
|
|
}
|
|
],
|
|
// will look at all of the Author's activities in the last 7 days
|
|
"window": "7 days"
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"kind": "report",
|
|
"content": "{{rules.freekarma.totalCount}} activities in karma {{rules.freekarma.subCount}} subs over {{rules.freekarma.window}}: {{rules.freekarma.subSummary}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|