Inside Component

IF/Else Control

The IF/Else control is the rule builder used when a trigger needs conditional behavior. It checks trigger data, chooses a result when a rule matches, and falls back to an Else result when nothing matches.

Purpose

IF/Else rule builder inside Add Trigger custom sequencing

In Add Trigger, this control appears in Custom sequencing and raw trigger hit rules. Custom sequencing uses IF/THEN rows to choose which source should run. Raw hit rules use the same IF structure to decide whether a raw event should count as a trigger.

Rule Row

Each row reads as a sentence: IF this trigger value matches this comparison, THEN use this result.

UI option
What it does
IF
The value to check. This is usually an Argument Control token such as {{message.text}}, {{user.name}}, or {{command.arguments[0]}}.
Operator
The comparison to run against the IF value.
Compare to
The value matched by the operator. Text comparisons can use plain text or another Argument Control token.
THEN
The result used when the rule matches. In custom sequencing, this is the source or source slot to show.
X
Deletes that rule row.

Operators

The available operators change based on the type of the token on the left side.

Value type
Available operators
String
Exists, Equals, Does not equal, Contains, Does not contain, Starts with, and Ends with.
Number
Exists, Equals, Does not equal, Greater than, and Less than.
Boolean
Exists, Equals, and Does not equal. The comparison value becomes a true/false selector.
Exists
Hides the Compare to field because the rule only checks whether the value is present.

THEN Result

The result column changes depending on where the IF/Else control is used.

Context
Result choices
Add Trigger Custom sequencing
Choose one or more sources for a normal box. For grouped boxes, map each child box to a source slot.
Raw hit rules
Choose Trigger when the raw event should run the box, or False when the matching event should be ignored.

Reorder And Nest

IF/Else control showing the four-dot drag handle at the start of the rule row

The four-dot control at the start of each row is the drag handle. Drag it up or down to reorder rules. Drag it onto the middle of another rule to nest it under that rule.

Drag target
What happens
Top of another row
Moves the dragged rule before that row.
Bottom of another row
Moves the dragged rule after that row.
Middle of another row
Nests the dragged rule as a child of that row. Use this when a rule should only be checked after its parent condition matches.

Order matters. NekoBot evaluates the rule structure from top to bottom, so place the most specific cases above broader fallback-style cases.

Else Fallback

Else source is the fallback result for Custom sequencing. If none of the IF rows match, NekoBot uses the Else source instead. Keep this set to a safe default source so the trigger still has a predictable result.