$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

Member04/02/2024
!!exec $function[printHello;name]
Hello $name 👋
$endFunction $callFunction[printhello;Mika]
Custom Command Bot 04/02/2024
Hello Mika 👋

Call the function, using $printHello

Member04/02/2024
!!exec $function[printHello;name]
Hello $name 👋
$endFunction $printhello[Mika]
Custom Command Bot 04/02/2024
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