Root definitions

CommentState

Permalink

Different attributes a Comment can be in. Only include a property if you want to check it.

Properties

age

string

A duration and how to compare it against a value

The syntax is (< OR > OR <= OR >=) <number> <unit> EX > 100 days, <= 2 months

  • EX > 100 days => Passes if the date being compared is before 100 days ago
  • EX <= 2 months => Passes if the date being compared is after or equal to 2 months

Unit must be one of DayJS Duration units

[See] https://regexr.com/609n8 for example

Pattern: ^\s*(>|>=|<|<=)\s*(\d+)\s*(days|weeks|months|years|hours|minutes|seconds|milliseconds)\s*$
approved

anyOf [Array<string>, ModeratorNameCriteria, string ∪ boolean]

  • true/false => test whether Activity is approved or not
  • string or list of strings => test which moderator approved this Activity
authorFlairBackgroundColor

anyOf [Array<string>, string ∪ boolean]

  • If true then passes if ANY color
  • If false then passes if NO color
  • If string or list of strings then color is matched, case-insensitive, without #. String may also be a regular expression enclosed in forward slashes.
authorFlairCssClass

anyOf [Array<string>, string ∪ boolean]

  • If true then passes if ANY class
  • If false then passes if NO class
  • If string or list of strings then class is matched, case-insensitive. String may also be a regular expression enclosed in forward slashes.
authorFlairTemplateId

anyOf [Array<string>, string ∪ boolean]

  • If true then passes if ANY flair
  • If false then passes if NO flair
  • If string or list of strings then template id is matched, case-insensitive. String may also be a regular expression enclosed in forward slashes.
authorFlairText

anyOf [Array<string>, string ∪ boolean]

  • If true then passes if ANY flair
  • If false then passes if NO flair
  • If string or list of strings then text is matched, case-insensitive. String may also be a regular expression enclosed in forward slashes.
createdOn

anyOf [Array<string>, string]

A relative datetime description to match the date the Activity was created

May be either:

  • day of the week (monday, tuesday, etc...)
  • cron expression IE * * 15 *

See https://crontab.guru/ for generating expressions

https://regexr.com/6u3cc

deleted

boolean

depth

string

The (nested) level of a comment.

  • 0 mean the comment is at top-level (replying to submission)
  • non-zero, Nth value means the comment has N parent comments
Pattern: ^\s*(>|>=|<|<=)\s*(\d+)\s*(days|weeks|months|years|hours|minutes|seconds|milliseconds)\s*$
dispatched

anyOf [Array<string>, string ∪ boolean]

Test whether the activity is present in dispatched/delayed activities

NOTE: This is DOES NOT mean that THIS activity is from dispatch -- just that it exists there. To test whether THIS activity is from dispatch use source

  • true => activity exists in delayed activities
  • false => activity DOES NOT exist in delayed activities
  • string => activity exists in delayed activities with given identifier
  • string[] => activity exists in delayed activities with any of the given identifiers
distinguished

boolean

filtered

boolean

locked

boolean

op

boolean

Is this Comment Author also the Author of the Submission this comment is in?

removed

anyOf [Array<string>, ModeratorNameCriteria, string ∪ boolean]

  • true/false => test whether Activity is removed or not
  • string or list of strings => test which moderator removed this Activity
reports

string

A string containing a comparison operator, a value to compare against, an (optional) report type filter, an (optional) qualifier for report reason, and an (optional) time constraint

The syntax is (< OR > OR <= OR >=) number[%] [type] [reasonQualifier] [timeValue] [timeUnit]

If only comparison and number is given then defaults to TOTAL reports on an Activity.

  • EX > 2 => greater than 2 total reports

Type (optional) determines which type of reports to look at:

  • mod -- mod reports
    • EX > 3 mod => greater than 3 mod reports
  • user -- user reports
    • EX > 3 user => greater than 3 user reports

Report reason qualifiers can be:

  • enclosed double or single quotes -- report reason contains
    • EX `> 1 "misinformation" => greater than 1 report with reason containing "misinformation"
  • enclosed in backslashes -- match regex
    • EX > 1 \harassment towards .*\ => greater than 1 report with reason matching regex \harassment towards .*\

Type and reason qualifiers can be used together:

EX `> 2 user "misinformation" => greater than 2 user reports with reasons containing "misinformation"

The time constraint filter reports created between NOW and [timeConstraint] in the past:

  • > 3 in 30 minutes => more than 3 reports created between NOW and 30 minutes ago
  • > 2 user "misinformation" in 2 hours => more than 2 user reports containing "misinformation" created between NOW and 2 hours ago
Pattern: ^\s*(>|>=|<|<=)\s*(\d+)(\s*%)?(\s+(?:mods?|users?))?(\s+(?:["'].*["']|\/.*\/))?.*(\d+)?\s*(days?|weeks?|months?|years?|hours?|minutes?|seconds?|milliseconds?)?\s*$
score

string

A string containing a comparison operator and a value to compare against

The syntax is (< OR > OR <= OR >=) <number>

  • EX > 100 => greater than 100
Pattern: ^\s*(>|>=|<|<=)\s*(\d+)\s*(%?)(.*)$
source

anyOf [Array<string>, string]

Test where the current activity was sourced from.

A source can be any of:

  • poll => activity was retrieved from polling a queue (unmoderated, modqueue, etc...)
  • poll:[pollSource] => activity was retrieved from specific polling source IE poll:unmoderated activity comes from unmoderated queue
    • valid sources: unmoderated modqueue newComm newSub
  • dispatch => activity is from Dispatch Action
  • dispatch:[identifier] => activity is from Dispatch Action with specific identifier
  • user => activity was from user input (web dashboard)
spam

boolean

stickied

boolean

submissionState

Array<SubmissionState>

A list of SubmissionState attributes to test the Submission this comment is in

Loading...

Editor and Validator