Root definitions

UserNoteActionJson

Permalink

Add a Toolbox User Note to the Author of this Activity

Properties

allowDuplicate

boolean

Add Note even if a Note already exists for this Activity

USE existingNoteCheck INSTEAD

Default: false
authorIs

anyOf [Array<anyOf [AuthorCriteria, NamedCriteria<AuthorCriteria>, string]>, FilterOptionsJson<AuthorCriteria>]

If present then these Author criteria are checked before running the Check. If criteria fails then the Check will fail.

content

string

The Content to submit for this Action. Content is interpreted as reddit-flavored Markdown.

If value starts with wiki: then the proceeding value will be used to get a wiki page from the current subreddit

  • EX wiki:botconfig/mybot tries to get https://reddit.com/r/currentSubreddit/wiki/botconfig/mybot

If the value starts with wiki: and ends with |someValue then someValue will be used as the base subreddit for the wiki page

  • EX wiki:replytemplates/test|ContextModBot tries to get https://reddit.com/r/ContextModBot/wiki/replytemplates/test

If the value starts with url: then the value is fetched as an external url and expects raw text returned

  • EX url:https://pastebin.com/raw/38qfL7mL tries to get the text response of https://pastebin.com/raw/38qfL7mL

If none of the above is used the value is treated as the raw context

  • EX this is **bold** markdown text => "this is bold markdown text"

All Content is rendered using mustache to enable Action Templating.

The following properties are always available in the template (view individual Rules to see rule-specific template data):

Copy
1 2 3 4 5 6 item.kind => The type of Activity that was checked (comment/submission) item.author => The name of the Author of the Activity EX FoxxMD item.permalink => A permalink URL to the Activity EX https://reddit.com/r/yourSub/comments/o1h0i0/title_name/1v3b7x item.url => If the Activity is Link Sumbission then the external URL item.title => If the Activity is a Submission then the title of that Submission rules => An object containing RuleResults of all the rules run for this check. See Action Templating for more details on naming
dryRun

boolean

If true the Action will not make the API request to Reddit to perform its action.

Default: false
enable

boolean

If set to false the Action will not be run

Default: true
existingNoteCheck

anyOf [UserNoteCriteria, boolean]

Check if there is an existing Note matching some criteria before adding the Note.

If this check passes then the Note is added. The value may be a boolean or UserNoteCriteria.

Boolean convenience:

  • If true or undefined then CM generates a UserNoteCriteria that passes only if there is NO existing note matching note criteria
  • If false then no check is performed and Note is always added
Default: true
itemIs

anyOf [Array<anyOf [SubmissionState, CommentState, NamedCriteria<TypedActivityState>, string]>, FilterOptionsJson<TypedActivityState>]

A list of criteria to test the state of the Activity against before running the check.

If any set of criteria passes the Check will be run. If the criteria fails then the Check will fail.

  • @examples [[{"over_18": true, "removed': false}]]
kind Required

string

The type of action that will be performed

Valid values: usernote

name

string

An optional, but highly recommended, friendly name for this Action. If not present will default to kind.

Can only contain letters, numbers, underscore, spaces, and dashes

Pattern: ^[a-zA-Z]([\w -]*[\w])?$
type Required

string

User Note type key

Loading...

Editor and Validator