Control Flow
scope
$scope — Runs functions in a cloned context
Runs functions in a cloned context
Syntax
$scope[code;(syncvars)]
Parameters
- code (text, required) — The code to execute
- syncvars (boolean, optional) — Whether to pass vars as reference
Return Value
- Unknown.
Usage
$scope[code;(syncvars)] → result
Example
$sendMessage[$let[a;1]$scope[$let[a;2]$let[b;3];b]$get[a]$get[b]]
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.