Misc
funcEnd
$funcEnd
Marks the end of a user-defined function block started with $func[...].
Syntax
$funcEnd
Parameters
None. An argument ($funcEnd[...]) is an error (“$funcend does not accept arguments.”).
Description
$funcEnd closes a function definition. Every $func[name;params...] must be paired with a matching $funcEnd. The parser treats everything between $func[...] and $funcEnd as the function body.
Nested $func definitions are supported — each inner $func must have its own $funcEnd.
Examples
Basic definition
$func[greet;name]
$funcReturn[Hello $funcArg[name]!]
$funcEnd
Multiple functions
$func[one]One$funcEnd
$func[two]Two$funcEnd
$sendMessage[$funcCall[one] $funcCall[two]]
Output: One Two
Nested functions
$func[outer]
$func[inner;x]
$funcReturn[<$funcArg[x]>]
$funcEnd
$funcCall[inner;nested]
$funcEnd
$sendMessage[$funcCall[outer]]
Output: <nested>, surrounded by the line breaks of the outer body (the inner function exists only while outer is running).
Notes
- Forgetting
$funcEndis a parse error (“Missing $funcend.”). - A
$funcEndwithout an open$funcis an error (“Unexpected $funcEnd.”). - A function without its closing
$funcEndis not registered: the script does not run at all.
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.