Skip to content
Control Flow endAsync

$endAsync

$endAsync closes a block opened by $async[name]. It takes no argument.

Syntax

$endAsync

Behavior

  • Every $async needs exactly one $endAsync. A missing one raises Missing $endasync., a stray one Unexpected $endasync..
  • The statements after $endAsync start immediately, while the body of the block runs at the same time. See $async for the full semantics and limits (25 blocks per execution, text only available through $await).

Example

$async[work]
  $var[result;done]
  $var[result]
$endAsync
Started.
$await[work]

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.