Skip to content

Timing actions

Pause, pause unpredictably, wait for a condition, wait for a chat line.

Four ways to make a flow wait. Which one you want depends on what you are waiting for: a duration, a state, or a message.

wait

Pauses for a fixed time.

FieldTypeRequiredNotes
msinteger, 1–600000yesMilliseconds, up to 10 minutes. The editor takes a number plus a unit.
wait 2 seconds

For a pause that varies each time, use random_wait.

random_wait

Pauses for a random duration in a range.

FieldTypeRequiredNotes
minMsinteger, 1–600000yesLower bound.
maxMsinteger, 1–600000yesUpper bound.
wait between 1500 and 4000 ms

wait_until

Waits for a condition to become true, instead of for a duration.

FieldTypeRequiredNotes
condconditionyesAny condition, combinators included.
timeoutMsinteger, 100–600000noDefault 10000.
pollMsinteger, 50–10000noDefault 250. How often to re-test.
failOnTimeoutbooleannoFail the step when the timeout expires instead of continuing.
wait until test health above 17 give up after 60 seconds — count a timeout as failed ☑

With failOnTimeout, a timeout is visible to try and to last_action_failed. Without it, the flow simply carries on, which is right when the wait was opportunistic.

wait_chat

Waits for a chat or whisper line to arrive.

FieldTypeRequiredNotes
patternstring, ≤200 charsnoRegular expression. Blank matches any line.
fromarray of player names, max 64noOnly accept lines from these players.
timeoutMsinteger, 100–300000noDefault 10000.
failOnTimeoutbooleannoOff by default, since a timeout is often the expected outcome.

The speaker lands in {{var:player}} when the server's format provides one, the message in {{var:message}}, and the pattern's capture groups in {{var:m1}} … {{var:m9}}. As on the chat trigger, a line with a sender is matched and stored without the name in front: for <Alice> !home base the pattern sees !home base. A line with no sender is matched whole.

when run manually or by webhook
command /balance
wait for chat matching Balance: (\d+) — give up after 5 seconds
set variable balance to {{var:m1}}

This is the action that makes "send a command, then read the answer" work. A chat trigger cannot do it: a trigger has no way to know which firing belongs to which command.

Timing actions · CubeMind docs