$function

Create a user-defined function that can be called by $callFunction or $functionName

Usage:

$function[Function name;Param 1 (optional);Param 2...(optional)]

Example:

$function[printHello;name]
    Hello $name
$endFunction

Call the function, using $callFunction

Member05/26/2023
!!exec $function[printHello;name]
Hello $name 👋
$endFunction $callFunction[printhello;Mika]
Custom Command Bot 05/26/2023
Hello Mika 👋

Call the function, using $printHello

Member05/26/2023
!!exec $function[printHello;name]
Hello $name 👋
$endFunction $printhello[Mika]
Custom Command Bot 05/26/2023
Hello Mika 👋

TIP

Code inside the function is isolated from outside, which means changing of variables, arrays, random,...won't effect the outside.
you can access outside temporary variables (assigned by $let) but you can't change them.

DANGER

A function name can't start with number, and must be within [A-Z or a-z or _ or 0-9] for short format ($functionName) but if you are using $callFunction to call the function, any name is valid

Function difficulty Difficult
Tags: Function Custom Functions Nested code