Skip to content
Utilities setInterval

$setInterval — Runs code every time the delay passes, until $clearInterval. 5 seconds at least, 24 hours at most; a run that is still going makes the next one skip.

Runs code every time the delay passes, until $clearInterval. 5 seconds at least, 24 hours at most; a run that is still going makes the next one skip.

Syntax

$setInterval[code;(time);(name)]

Parameters

  • code (String, required) — BibiScript code to run later (never run now)
  • time (String, optional) — Delay: 10s, 5m, 1h or milliseconds
  • name (String, optional) — Name, to cancel it with $clearTimeout / $clearInterval

Return Value

  • String.

Usage

$setInterval[code;time;name] → result

Example

$sendMessage[$setInterval[code;time;name]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.