Skip to main content

Options reference

Use these options with nexAction.triggers.add or nexAction.aliases.add.

OptionTypeDefaultNotes
regexRegExp | string | Array<RegExp | string>RequiredUse arrays for ordered, multi-step sequences.
actionfunctionRequiredReceives the regex match array (or {} for string patterns).
idstringcrypto.randomUUID()Unique identifier; duplicates are reassigned.
tagsstring[][]Used for group operations like remove or disable.
enabledbooleantrueDisabled triggers are skipped during processing.
oncebooleanfalseRemoves the trigger after a complete match.
durationnumberfalseMilliseconds before applying finalAction; also used as a sequence timeout.
fgstringfalseHex foreground color to match.
bgstringfalseHex background color to match.
linesnumber0Line count window before the trigger resets or removes.
promptbooleanfalseApplies finalAction on the next PromptEvent.
finalAction"remove" | "disable""remove"Action used by duration and prompt.
onRemovefunctionOptionalRuns before the trigger is removed.
onDisablefunctionOptionalRuns when the trigger is disabled.
onEnablefunctionOptionalRuns when the trigger is enabled.

Tip: If you need access to the reflex object inside action, use function () {} instead of an arrow function so this is set to the reflex.