Require

Require

Stop the command unless a condition is met, optionally running fallback steps

Fields

FieldTypeRequiredDescription
conditionscondition treeyesSame grammar as if.condition.
onFailarray of stepsnoRuns when the condition fails; the ENTIRE run halts after onFail finishes, not just this branch.

Example

{
  "id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
  "type": "require",
  "conditions": {
    "op": ">=",
    "a": {
      "path": "user.coins"
    },
    "b": {
      "literal": 50
    }
  },
  "onFail": []
}

Did this page help you?