configs/Mikting/libs/. Set libs.dir to use another location and
set allowSubfolders: true to load nested files.
A library file declares version: 1 and a list of functions. This example adds
two numbers and leaves the result in result:
version: 1 are skipped with a warning. Call a function with
miktingCallFunction:
result is copied back,
using the storeAs name when supplied. Other variables created by the function
stay in its scope.
miktingInclude { path } serves a different purpose: it runs an
{actions:[...]} snippet in the caller’s shared scope. Include paths must stay
inside the bot working directory.
On first load, Mikting creates the default library directory and copies the
bundled math.yml, strings.yml, and store.yml examples from
resources/libs/. Existing directories and edited files are preserved. Add or
change a YAML file, then run /reload to load it. /mikting-libs lists
function names and parameters.
Move libraries from the old location
If an existing install usesscripting/libs/mikting/, move those files to
configs/Mikting/libs/ and set:
/reload after changing the path. Updating the addon keeps the configured
libs.dir; it does not move files for you.
Documentation home · Source Markdown